Make a Player in Visual Basic
Hi all ,
What we'll need:
Windows Media Player
OpenFileDialog
MenuStrip
Let's begin:
1.Create a new project,name it "Player" and make the form look like a real WMP..(big in size!)
2.Then drag the WMP on the form and cover it like this:
3.Rename the WMP,to:"player1" and add an openfiledialog.
4.Then,go to the properties of the opnfldg and put into the filter field:"(*.*)|*.*",this will make the player open any file you want!
5.Add a menustrip(look in the pic above)and write:"File" in the first field,below write:"Open"and another(below)for the:"Quit".
6.Double-click the "Open" menu and put the following code:
Code:
OpenFileDialog1.ShowDialog()
Player1.URL = OpenFileDialog1.FileName
-the"openfiledialog.showdialog"will allow you to search your PC and the next line directs the player to read the file from the openfiledialog!
double-c the "Quit" menu and type in the code:
Code:
Me.Close
-To close the program.
Ok that's it!Of course you could play there and add some other features,but this was just a basic one
What we'll need:
Windows Media Player
OpenFileDialog
MenuStrip
Let's begin:
1.Create a new project,name it "Player" and make the form look like a real WMP..(big in size!)
2.Then drag the WMP on the form and cover it like this:
3.Rename the WMP,to:"player1" and add an openfiledialog.
4.Then,go to the properties of the opnfldg and put into the filter field:"(*.*)|*.*",this will make the player open any file you want!
5.Add a menustrip(look in the pic above)and write:"File" in the first field,below write:"Open"and another(below)for the:"Quit".
6.Double-click the "Open" menu and put the following code:
Code:
OpenFileDialog1.ShowDialog()
Player1.URL = OpenFileDialog1.FileName
-the"openfiledialog.showdialog"will allow you to search your PC and the next line directs the player to read the file from the openfiledialog!
double-c the "Quit" menu and type in the code:
Code:
Me.Close
-To close the program.
Ok that's it!Of course you could play there and add some other features,but this was just a basic one
0 Response to Make a Player in Visual Basic
Post a Comment