hi...
Just a quick one...
I want to run a movie file in WMP(Windows Media Player) from clicking a button.
The button is pressed, a dialog box opens, and a movie is selected. Ok is pressed and up opens WMP and the movie plays.
Only things is the coding I have done doesn't work.
I can get it to play the movie using a destop shortcut, but vb wont reconise the command properly.
This is my code so far...
Private Sub lblPlay_Click()
On Error GoTo Cancel
Dim openMovie
Dim movie As String
cdbmovie.Filter = "DivX Movie | *.avi"
cdbmovie.ShowOpen
movie = cdbmovie.FileName
openMovie = "C:\Program Files\Windows Media Player\wmplayer.exe" & """ """ & movie
'MsgBox "test", vbInformation, "test"
Unload Me
End
Exit Sub
I don't understnad why it wont work...
If any one has any idea, it would be great....
thanx...
Just a quick one...
I want to run a movie file in WMP(Windows Media Player) from clicking a button.
The button is pressed, a dialog box opens, and a movie is selected. Ok is pressed and up opens WMP and the movie plays.
Only things is the coding I have done doesn't work.
I can get it to play the movie using a destop shortcut, but vb wont reconise the command properly.
This is my code so far...
Private Sub lblPlay_Click()
On Error GoTo Cancel
Dim openMovie
Dim movie As String
cdbmovie.Filter = "DivX Movie | *.avi"
cdbmovie.ShowOpen
movie = cdbmovie.FileName
openMovie = "C:\Program Files\Windows Media Player\wmplayer.exe" & """ """ & movie
'MsgBox "test", vbInformation, "test"
Unload Me
End
Exit Sub
I don't understnad why it wont work...
If any one has any idea, it would be great....
thanx...