how to close the 1st mediaplayer object when opening a second ?
-
In Visual Basic 6, I want to make a mediaplayer executable using MS control: mediaplayer to play mpg files. I've got a problem if I opened the same movie object twice without knowing whether or not a same application was playing at the moment. How can I determine the status of a mediaplayer obect so that when I play it for the second time, the first one, if still playing, can be stopped and closed? I have tried to mediaplayer.stop and end the application when either form and mediaplayer losts its focus. It is supposed to work like this: when I run/play a second movie, the first one may lost focus and thus being stopped and closed. But it failed, i.e when I click the application twice, the second one will pop up and run, however, the first movie will be running simutaneously at background. Any comments and suggestions? Thanks in advance! DJ DJ