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.

9 thoughts on “How to Embed a Flash File into C# Window Form?

  1. 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. 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. axShockwaveFlash1.Movie = “C:\\Documents and Settings\\admin\\Desktop\\Dispose\\mis2.swf”;
    axShockwaveFlash1.Play();

  4. 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();

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

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

    try this it working

  6. Hi Everybody. I tried this, but the problem is I did not have flash player installed in my computer. So I downloaded it from Adobe’s website, but still I could not find it in my COM-Components Tab. Instead I could find a component named Shockwave Activex Control. I tried using this control but it did not work. Any suggestions how this task can be achieved??

  7. Hi friends,

    This Is reply to Mahesh,

    Hi Mahesh you can find this by
    Install Flash player activeX First.
    right clicking on gerneral on toolbox
    then click on choose items.

    Now select com components and check shockwave flash object. now click add.

    I hope this solves your problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>