title: Windows Media Player VB.net
body: <p>I have a WMP in my vb.net project and I wanted to load the next media automatically after the first is finnished I did some research on googel and found the simple to understand code as per below.</p>
  
  <pre><code>      Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As System.Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChange
  
  If AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsStopped Then
              AxWindowsMediaPlayer1.URL = ("Test2.mp4")
              MessageBox.Show("Playing End")
          End If
  End Sub
  </code></pre>
  
  <p>I however cant get it to automatically play the next (Test2.mp4) unless I have the messagebox pop-up. I discovered this purely by accident. However I dont want the Messagebox to pop-up everytime a new Mp4 file is ready to be played. Dose anybody know what is going on here and how I can fix this?</p>