VB6.0制作一个MP3播放器:能下一首 上一首 进度条 音量 返回主菜单 谢谢啊,教我怎么做。我vb不怎么会。
2个回答
展开全部
加入drive,file,dir控件,1个label,两个按钮,一个wmp控件(自带有音量控制,进度条)
Private Sub Command1_Click()
File1.ListIndex = File1.ListIndex + 1
File1_Click
End Sub
Private Sub Command2_Click()
File1.ListIndex = File1.ListIndex -1
File1_Click
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
If File1.ListCount > 0 Then
If Right(Dir1.Path, 1) <> "\" Then
Label1.Caption = Dir1.Path & "\" & File1.FileName
WindowsMediaPlayer1.URL = Label1.Caption
End If
Else
Label1.Caption = Dir1.Path & file.FileName
End If
End Sub
Private Sub Command1_Click()
File1.ListIndex = File1.ListIndex + 1
File1_Click
End Sub
Private Sub Command2_Click()
File1.ListIndex = File1.ListIndex -1
File1_Click
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
If File1.ListCount > 0 Then
If Right(Dir1.Path, 1) <> "\" Then
Label1.Caption = Dir1.Path & "\" & File1.FileName
WindowsMediaPlayer1.URL = Label1.Caption
End If
Else
Label1.Caption = Dir1.Path & file.FileName
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询