vB中的Windows Media Player控件
发布网友
发布时间:2022-07-14 18:56
我来回答
共1个回答
热心网友
时间:2023-07-09 00:08
参考代码如下
Private Sub File1_Click()
WindowsMediaPlayer1.url = App.Path + "\" + File1.List(File1.ListIndex)
WindowsMediaPlayer1.Controls.play
End Sub
Private Sub Form_Load()
File1.Path = App.Path
End Sub
Private Sub WindowsMediaPlayer1_OpenStateChange(ByVal NewState As Long)
WindowsMediaPlayer1.url = App.Path + "\1.mp3"
WindowsMediaPlayer1.Controls.play
'WindowsMediaPlayer1.controls.pause '暂停
'Controls.currentPosition = 10 '设置当前播放未知
End Sub