To Add Flash into your winforms is difficult task compair to adding flash object on webpage.here i have mention the steps to add flash control into your windows application.
- 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.
- 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.
- 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";
4:
5: axShockwaveFlash1.Dock = DockStyle.Fill;
6: panel1.Controls.Add(axShockwaveFlash1);
7: axShockwaveFlash1.LoadMovie(0, PAth);
8: axShockwaveFlash1.Play();