Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
SWF Player + Downloader
Author:
Skillsa2/Lama_Disco
E-mail:
Click to e-mail author
Submitted:
8/14/2012
Version:
VB 2010
Compatibility:
VB 2010
Category:
File Manipulation
Views:
7947
This is an Simple code on how to make an swf player in Visual Basic 2008 / 2010. Its also includes an inbuild SWF Downloader so you can download swf files.
Declarations:
Skillsa2/Lama_Disco (C) YOU must ask before publishing this file on the internet contact me on my E-mail: bregotter@gmail.com BTW this is my first VBS Example plz comment =P
Code:
This is the code for the SWF Player ___________________________________________________ Public Class SWFPlayer Private Sub BrowseToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BrowseToolStripMenuItem.Click Try OpenFileDialog1.Title = "Open SWF File" OpenFileDialog1.FileName = ".swf" OpenFileDialog1.Filter = "Shockwave Flash Object|*.swf*" OpenFileDialog1.ShowDialog() AxShockwaveFlash1.Movie = OpenFileDialog1.FileName Catch ex As Exception 'Do Nothing End Try End Sub Private Sub BrowseURLToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BrowseURLToolStripMenuItem.Click URLbrowser.ShowDialog() End Sub Private Sub DownloadSWFToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DownloadSWFToolStripMenuItem.Click swfDownloader.ShowDialog() End Sub ___________________________________________________ Code for URL SWF player browser ___________________________________________________ Public Class URLbrowser Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click SWFPlayer.AxShockwaveFlash1.Movie = (TextBox1.Text) End Sub Private Sub URLbrowser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class ___________________________________________________ And this is the code for the SWF Downloader code ___________________________________________________ Imports System.Net Public Class swfDownloader Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WebClient1.DownloadFileAsync(New Uri(TextBox3.Text), TextBox2.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim s As New SaveFileDialog s.Title = "Save SWF File" s.FileName = ".swf" s.Filter = "Shockwave Flash Object|*.swf*" If s.ShowDialog = Windows.Forms.DialogResult.OK Then TextBox2.Text = s.FileName End If End Sub Private Sub WebClient1_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebClient1.DownloadFileCompleted MsgBox("Downloading Completed!", MsgBoxStyle.Exclamation, "SWF Downloader") End Sub Private Sub WebClient1_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles WebClient1.DownloadProgressChanged ProgressBar1.Value = e.ProgressPercentage Label1.Text = e.ProgressPercentage.ToString + "%" End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement