5个回答
展开全部
1、窗体添加控件WindowsMediaPlayer1,这个应该会吧
2、程序
Dim flag As Boolean
Private Sub Form_Load()
With WindowsMediaPlayer1
.uiMode = "full"
End With
End Sub
'播放暂停
Private Sub Command1_Click()
flag = Not flag
With WindowsMediaPlayer1
If flag = True Then
Command1.Caption = "pause"
.Controls.Play
Else
Command1.Caption = "play"
.Controls.pause
End If
End With
End Sub
'停止
Private Sub Command2_Click()
With WindowsMediaPlayer1
.Controls.Stop
End With
End Sub
Private Sub Command4_Click() '打开文件
With CommonDialog1
' .Filter = "avi (*.avi)|*.avi"
.ShowOpen
End With
With WindowsMediaPlayer1
' .URL = App.Path + "\017 喜欢你没道理 张韶涵.mp3"
.Controls.Stop
End With
'快进
Private Sub Command3_Click()
With WindowsMediaPlayer1
.Controls.currentPosition = .Controls.currentPosition + 10
End With
End Sub
'快退
Private Sub Command5_Click()
With WindowsMediaPlayer1
.Controls.currentPosition = .Controls.currentPosition - 10
End With
End Sub
2、程序
Dim flag As Boolean
Private Sub Form_Load()
With WindowsMediaPlayer1
.uiMode = "full"
End With
End Sub
'播放暂停
Private Sub Command1_Click()
flag = Not flag
With WindowsMediaPlayer1
If flag = True Then
Command1.Caption = "pause"
.Controls.Play
Else
Command1.Caption = "play"
.Controls.pause
End If
End With
End Sub
'停止
Private Sub Command2_Click()
With WindowsMediaPlayer1
.Controls.Stop
End With
End Sub
Private Sub Command4_Click() '打开文件
With CommonDialog1
' .Filter = "avi (*.avi)|*.avi"
.ShowOpen
End With
With WindowsMediaPlayer1
' .URL = App.Path + "\017 喜欢你没道理 张韶涵.mp3"
.Controls.Stop
End With
'快进
Private Sub Command3_Click()
With WindowsMediaPlayer1
.Controls.currentPosition = .Controls.currentPosition + 10
End With
End Sub
'快退
Private Sub Command5_Click()
With WindowsMediaPlayer1
.Controls.currentPosition = .Controls.currentPosition - 10
End With
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
好吧先得从部件里找到WMDP控件,还有一个在工具箱里的list控件
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询