Add Flash Object In WinForms

    To Add Flash into your winforms is difficult task compair to adding flash object on i have mention the steps to add flash control into your windows application.

  1. You need to add the Shockwave ActiveX control that will host your Flash movie to the Visual Studio toolbox.Right click the toolbox, and select Add Tab to add a new toolbox tab. Next you should rename it to something meaningful. You need to generate an InterOp Assembly to be able to use the ActiveX control on a WinForm.
  2. Right click the toolbox,and select Choose Item that will pop up the Customize Toolbox Dialog.Go to the COM Components tab and search for Shockwave Flash Object and click the OK Button.
  3. After Finish all sep that mention above place that code on Load Events  of the form.
   1: AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1 = new AxShockwaveFlashObjects.AxShockwaveFlash();
   2:             string PAth = System.Environment.CurrentDirectory;
   3:             PAth += @"\index2.swf";
   5:             axShockwaveFlash1.Dock = DockStyle.Fill;
   6:             panel1.Controls.Add(axShockwaveFlash1);
   7:             axShockwaveFlash1.LoadMovie(0, PAth);
   8:             axShockwaveFlash1.Play();

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s