Hi
I used Windows Media Player control to programme a simple player,
The problem is when the song finishes playing it must jump to next
item automatically. (listbox's items are used as media's path(url) ) .
I couldn't find an event for WMP control (AxWindowsMediaPlaeyr1) to do
that. A simple button does that, but i want it to be done
automatically not by pressing button.
Here is my code:
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button12.Click
Try
If Me.AxWindowsMediaPlayer1.playState =
WMPLib.WMPPlayState.wmppsStopped Then
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex +
1
End If
Label2.Text = ListBox1.SelectedItem
Me.AxWindowsMediaPlayer1.URL = Label2.Text
Catch ex As Exception
MsgBox("Error")
End Try
End Sub
|