How to Embed a Flash File into C# Window Form?

To embed a flash file in C# Windows .Net Application we can use Shockwave Flash Object ActiveX Control.

Follow the Steps to embed flash file:

Step 1: In Tool box right click and select the menu “Choose Items”.

Step 2: From Choose Toolbox Items window select “Com component” tab.

Step 3: Scroll down and make sure “Shockwave Flash Object” is ticked and click ok. The Shockwave Flash Object will now appear in the toolbox.

Step 4: Simply click and drag the Shockwave Flash Object to window Form.

Step 5: Add the Code “Form Load”.

axShockwaveFlash1.LoadMovie(0, Application.StartupPath + “flash.swf”);

These steps embed the flash file and loads “flash.swf” in the application path when window loads.

Popularity: 14% [?]

Related posts:

  1. How to Text Over a SWF?
  2. How to open an application, file Using Shell execute in .net
  3. Refresh the Window
You can leave a response, or trackback from your own site.

6 Responses to “How to Embed a Flash File into C# Window Form?”

  1. anuj gupta says:

    i used ur code to attach flash file bt its not working form loading is proper bt flash file not running in that asshockwaveflash1 control

  2. Ramveer Singh says:

    Hi
    I want to embed the swf file with in my exe. I dont want to keep swf file from the exe. I want to create only one exe which play its embed swf file.
    How can i do this. Can u Help me…

  3. try build and rebuild to dll error

  4. Buddhika says:

    axShockwaveFlash1.Movie = “C:\\Documents and Settings\\admin\\Desktop\\Dispose\\mis2.swf”;
    axShockwaveFlash1.Play();

  5. Buddhika says:

    Put this code in your formload event

    axShockwaveFlash1.Movie = “C:\\Documents and Settings\\admin\\Desktop\\Dispose\\mis2.swf”;(This is my file path for flash object give your file path and run)
    axShockwaveFlash1.Play();

  6. moh_mega says:

    thanx for you help ,
    but i think the code isn’t complete

    axShockwaveFlash1.LoadMovie(0, @”C:\———\——–\flash.swf”);

    try this it working

Leave a Reply

Designed by: Business Web Hosting | Thanks to Buy Icons, travel tips and Used Cars