Just a quick tutorial on how to integrate .SWF files into your VB.NET applications using the Shockwave Flash Object component.
This is very simple to do and it's really quite useful to know.
You need to start off by adding the component. To do this, right click on "All Windows Forms" in your Toolbox, and select "Choose Items".
On the pop-up window, select the COM tab, and scroll down to Shockwave Flash Object. Check the box next to it, and click OK.
Now find the Shockwave Flash Object in your Toolbox, and drag it onto your form. Now you just need to get it to play something! For this example I will simply add an OpenFileDialog, which will be used to select the the .SWF file, and open it in the Shockwave Flash Player. Note you can also link directly to an .SWF URL in the same way.
And there you have it..
This is very simple to do and it's really quite useful to know.
You need to start off by adding the component. To do this, right click on "All Windows Forms" in your Toolbox, and select "Choose Items".
On the pop-up window, select the COM tab, and scroll down to Shockwave Flash Object. Check the box next to it, and click OK.
Now find the Shockwave Flash Object in your Toolbox, and drag it onto your form. Now you just need to get it to play something! For this example I will simply add an OpenFileDialog, which will be used to select the the .SWF file, and open it in the Shockwave Flash Player. Note you can also link directly to an .SWF URL in the same way.
Code:
Dim OFD As New OpenFileDialog
OFD.Filter = "SWF Files (*.swf)|*.swf|All files (*.*)|*.*"
Dim results As DialogResult
results = OFD.ShowDialog
If results = DialogResult.OK Then
AxShockwaveFlash1.Movie = OFD.FileName
End If
And there you have it..