Thom
Nov 10th, 2000, 08:35 AM
Sheesh..seems I’ve managed to stump the experts here!
What I’m Trying to do in my VB networked program is use ShellExecute to launch the Windows Media Player, and then shut it down from the program.
First the code to LAUNCH:
Dim ItemFile As String
ItemFile = "Training1.mpg"
Call ShellExecute(hwnd, "Open", ItemFile, "", App.Path & "\Items\", 1)
bIsPlaying = True ' SETS THE MULTIMEDIA FLAG!!!
So now I have the Media running; what I WANT to have happen is when the user clicks the “Next Item” button, code in the click event ENDS/CLOSES/KILLS the Windows Media Player!
I’ve looked at the SendMessage, TerminateProcess, and CloseHandle API calls but NONE of them work! Does ANYONE have an idea of how to simply close the MediaPlayer with code from the VB program that will work in Windows 98 AND NT 4.0?? I’d really appreciate any help. Thanks!
What I’m Trying to do in my VB networked program is use ShellExecute to launch the Windows Media Player, and then shut it down from the program.
First the code to LAUNCH:
Dim ItemFile As String
ItemFile = "Training1.mpg"
Call ShellExecute(hwnd, "Open", ItemFile, "", App.Path & "\Items\", 1)
bIsPlaying = True ' SETS THE MULTIMEDIA FLAG!!!
So now I have the Media running; what I WANT to have happen is when the user clicks the “Next Item” button, code in the click event ENDS/CLOSES/KILLS the Windows Media Player!
I’ve looked at the SendMessage, TerminateProcess, and CloseHandle API calls but NONE of them work! Does ANYONE have an idea of how to simply close the MediaPlayer with code from the VB program that will work in Windows 98 AND NT 4.0?? I’d really appreciate any help. Thanks!