如何用Timer控件做循环播放的播放器
Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChangeIf AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsMediaEnded Then
Timer2.Start()
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If AxWindowsMediaPlayer1.status = "已停止" Then
ListBox1.SelectedIndex += 1
AxWindowsMediaPlayer1.settings.autoStart = True
AxWindowsMediaPlayer1.URL = ListBox1.SelectedIndex
AxWindowsMediaPlayer1.Ctlcontrols.play()
End If
End Sub
不知道这个代码是否正确
应该怎么修改啊?急需