Code to run video on WindowsMediaPlayer component on a VB 6 form
Posted on 2004-08-04
I have the following code to run video by first launching "WindowsMediaPlayer exe file installed on the computer" and then running .wmv file:
Public Function StartDoc(ByVal FileName As String, Optional CommandLine As String = "")
StartDoc = ShellExecute(0 &, "Open", FileName, CommandLine, VbNullString, 1)
Q1. How can I revise above code to open my 1.wmv file through the control on the form (WindowsMediaPlayer component on a VB form)?
Q2. What is the code to switch video play to "WindowsMediaPlayer exe file installed on the computer" through a double-click action (directly on the component on the form).