Quantcast
Viewing all articles
Browse latest Browse all 27056

VS 2010 [RESOLVED] Windows Media Player

I am using the Windows Media Player in my application with Visual Basic.NET Ultimate. Here is the code I use:

Code:

    Public MediaPlayerObject As WindowsMediaPlayer = New WindowsMediaPlayer
How can I detect when the current Media File has finished playing?

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

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?

Viewing all articles
Browse latest Browse all 27056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>