Locked embedding .swf to vb.net forms

  • Sunday, July 30, 2006 2:26 PM
     
     
    can someone give me the codes needed to embed an swf file ( a flash animation for the banner) in a window form.. thanks.. im using the version 8, macromedia pro... thanks.

All Replies

  • Sunday, July 30, 2006 5:55 PM
    Moderator
     
     Answered
    Right-click the project and click Properties, Resources tab.  Click the arrow on "Add resource" button and choose Add Existing File.  Navigate to your .swf file.  Build your project.  You now have a My.Resources.flashname property which returns a Byte().  No idea how you'd play it with MacroMedia though...
  • Sunday, July 30, 2006 6:21 PM
     
     
    I think component one flash control will allow you to play them
  • Sunday, July 30, 2006 8:21 PM
     
     Answered

    I suppose you could always write a file from this embedded resource at runtime.

     

  • Sunday, July 30, 2006 8:27 PM
     
     
    Embed it in HTML, put and display html in web browser. You could also use OLE Control
  • Monday, July 31, 2006 1:36 AM
     
     
    guys, thanks for the reply.. but, i'm really new in vb.net. please give me a more detailed instructions on how to do it.. thanks a lot.. im hoping for your support regarding this matter. thanks.
  • Monday, July 31, 2006 3:42 PM
     
     
    Put your swf file in My Documents. Rename it sample.swf. Open notepad. Type

    <html>
    <body>
    <OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
    CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
    <PARAM NAME="MOVIE" VALUE="sample.swf">
    <PARAM NAME="PLAY" VALUE="true">
    <PARAM NAME="QUALITY" VALUE="best">
    <PARAM NAME="LOOP" VALUE="true">
    <EMBED SRC="sample.swf" WIDTH="400" HEIGHT="300" PLAY="true" LOOP="true" QUALITY="best"
    PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
    </EMBED>
    </OBJECT></body>
    </html>


    Go File>Save As

    Save it in My Documents as html.html. select the 'all files' in the combo box. (not text files)

    In VB Add a web browser control. Right click it, and select properties. Scrolldown the box on the right. In th url field enter the location of the text file (something like C:/Users/Your account name/Documents/html.html)

    run the app. The swf should appear in the web browser!!

  • Monday, July 31, 2006 8:28 PM
     
     Answered

    Hi,

    Right click your toolbox then select Choose Items. After that a dialog box will be displayed. Select the COM Components tab.
    Find the shockwave control. After that, place it in your form then goto the properties window and specify the path of your flash file.

     

    cheers,

    Paul June A. Domag

  • Tuesday, August 01, 2006 12:54 AM
     
     
     Paul Domag wrote:

    Hi,

    Right click your toolbox then select Choose Items. After that a dialog box will be displayed. Select the COM Components tab.
    Find the shockwave control. After that, place it in your form then goto the properties window and specify the path of your flash file.

    cheers,

    Paul June A. Domag



    ei, i followed your instructions. i already added the shockwave flash object in the toolbox. but, the problem is, as i am trying to add the control in my form, a dialog box suddenly pop-out saying " Failed to import the ActiveX control. Please ensure it is properly registered. is it because im only using the trial version of the macromedia? or what. please help me.. please please. thanks.
  • Tuesday, August 01, 2006 1:02 AM
     
     
    ei neotech, how am i going to add a web browser in my vb form? please?
    thanks.
  • Tuesday, August 01, 2006 8:20 AM
     
     
    in the toolbox, scroll down nearish the bottom, drag the control 'web browser' in. its just like a frame for wel... displaying web pages. if its not there right click the toolbox and add it (i think sum1 explined that above)
  • Saturday, April 21, 2007 4:56 AM
     
     

    Install the latest version of Adobe Macromedia Flash Player (9.0 r28)
    which is capable with VS2005 at www.adobe.com .

    The name and path of it should be "%systemroot%\system32\macromed\flash9c.ocx".

    The previous versions do not work with VS2005.

  • Friday, December 28, 2007 5:35 PM
     
     

     

    The reason you are getting the "Failed to import the ActiveX control" Error is because you need to add a reference to the com component called "OLE Automation" to your project.  After you add that, you will no longer receive the error.
  • Friday, March 25, 2011 1:38 AM
     
     

    Hello,

     

    Considering that many developers in this forum ask how to manipulate WebBrowser component (enabling flash, suppressing error messages, proxy support), rotate or flip images, my team has created a code sample for this frequently asked programming task in Microsoft All-In-One Code Framework. You can download the code samples at:

     

    VBWebBrowserWithProxy

     

    http://bit.ly/VBWebBrowserWithProxy

     

    CSWebBrowserWithProxy

     

    http://bit.ly/CSWebBrowserWithProxy

     

    With these code samples, we hope to reduce developers’ efforts in solving the frequently asked

    programming tasks. If you have any feedback or suggestions for the code samples, please email us: onecode@microsoft.com.

    ------------

    The Microsoft All-In-One Code Framework (http://1code.codeplex.com) is a free, centralized code sample library driven by developers' needs. Our goal is to provide typical code samples for all Microsoft development technologies, and reduce developers' efforts in solving typical programming tasks.

    Our team listens to developers’ pains in MSDN forums, social media and various developer communities. We write code samples based on developers’ frequently asked programming tasks, and allow developers to download them with a short code sample publishing cycle. Additionally, our team offers a free code sample request service. This service is a proactive way for our developer community to obtain code samples for certain programming tasks directly from Microsoft.

    Thanks

    Microsoft All-In-One Code Framework