if (e.newState = WMPLib.WMPPlayState.wmppsReady)
{
AxWindowsMediaPlayer1.Ctlcontrols.play();
}
如果是就表示以播放完毕可以播放下一个.
If e.newState = WMPLib.WMPPlayState.wmppsStopped Then
AxWindowsMediaPlayer1.URL = ListBox1.Items(index).ToString //index是你下一首的
AxWindowsMediaPlayer1.Ctlcontrols.play()
*******************************************************************************
Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChange
If e.newState = WMPLib.WMPPlayState.wmppsStopped Then
If ListBox1.SelectedIndex = ListBox1.SelectedIndex - 1 Then
AxWindowsMediaPlayer1.Ctlcontrols.stop()
Else
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1
AxWindowsMediaPlayer1.URL = ListBox1.Items(ListBox1.SelectedIndex).ToString 'index是你下一首的
AxWindowsMediaPlayer1.Ctlcontrols.play()
End If
End If
End Sub
****************************************************************
https://social.msdn.microsoft.com/Forums/zh-CN/fb04d284-d167-4b4b-a610-dd87e1580592/listboxaxwindowsmediaplayer?forum=vbasiczhchs
http://bbs.bccn.net/thread-132392-1-1.html