locked
How do I embed/play a Flash file (.swf) on WinForm? RRS feed

  • Question

  • How do I embed/play a Flash file (.swf) on WinForm?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, April 10, 2009 9:38 AM

Answers

  • To play a Flash file (.swf) on WinForm, here are two approaches:

    1) Use an AxWebBrowser component

    Right-click the ToolBox -> select 'Choose Items ...' -> Select the COM tab -> Select "Microsoft Web Browser"

    Now the Microsoft Web Browser control will appear on the Toolbox. Drag it onto the form and specify the .swf file.

     

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
         Me.AxWebBrowser1.Navigate("D:\flash.swf")
    End Sub
    
    

     

    Related thread:

    http://social.msdn.microsoft.com/forums/en-US/winforms/thread/d5fb9152-4d88-443c-958f-7dd5aa29de7e/

     

    2) Use a Shockwave Flash Object

    First, please make sure the Adobe Macromedia Flash Player has been installed.

    Right-click Toolbox -> Click "Choose Items" -> COM tab -> Choose Shockwave Flash Object

    Now the control named “Shockwave Flash Object” will appear on the Toolbox. Drag it onto the form and specify  the .swf file for the Movie property.

     

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
         Me.AxShockwaveFlash1.Movie = "D:\flash.swf"
    End Sub
    
    

     

    Detailed thread:

    http://social.msdn.microsoft.com/forums/en-US/Vsexpressvb/thread/55ed8641-e93b-4c2a-94e9-67081f0a6148/

     

    For more FAQ about Visual Basic .NET General, please see Visual Basic .NET General FAQ

      


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, April 10, 2009 9:39 AM