window|解决|问题
实际上就是先定义一个WMP的播放列表:
Dim CurrentList As WMPLib.IWMPPlaylist = Me.AxWindowsMediaPlayer1.currentPlaylist
Dim Media As WMPLib.IWMPMedia
'这里可以使用数组循环,从而得到播放列表
Media = Me.AxWindowsMediaPlayer1.newMedia("K:\娱乐休闲\mp3\寂寞的季节.mp3")
CurrentList.appendItem(Media)
Media = Me.AxWindowsMediaPlayer1.newMedia("K:\娱乐休闲\mp3\IBelieve.mp3")
CurrentList.appendItem(Media)
重复播放
Private Sub AxWindowsMediaPlayer1_PlayStateChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChange
AxWindowsMediaPlayer1.Ctlcontrols.play()
End Sub
时间: 2024-12-21 11:01:57