I am using the Windows Media Player in my application with Visual Basic.NET Ultimate. Here is the code I use:
How can I detect when the current Media File has finished playing?
I see that there is this code:
Am I correct in saying that the above code only works under the StatusChange event of the actual control when placed on a form? Can I add an event handler or something similar when adding the WindowsMediaPlayer via code?
Code:
Public MediaPlayerObject As WindowsMediaPlayer = New WindowsMediaPlayer
I see that there is this code:
Code:
Private Sub WindowsMediaPlayer1_StatusChange()
If WindowsMediaPlayer1.playState = wmppsMediaEnded Then
Debug.Print "New Media please :)"
End If
End Sub