永发信息网

帮着用vb6做一个音乐播放器可以么?大神们帮帮忙

答案:2  悬赏:60  手机版
解决时间 2021-02-23 00:53
  • 提问者网友:孤山下
  • 2021-02-22 21:17
rt 简单就好 越简单越好
最佳答案
  • 五星知识达人网友:像个废品
  • 2021-02-22 22:55
VERSION 5.00 Begin VB.Form Form12 Caption = "播放音频文件" ClientHeight = 7650 ClientLeft = 60 ClientTop = 450 ClientWidth = 10875 LinkTopic = "Form12" ScaleHeight = 7650 ScaleWidth = 10875 StartUpPosition = 3 '窗口缺省 End Attribute VB_Name = "Form12" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long Private Sub Form_Click() Dim x x = mciExecute("play F:\OneMoreTime-Jewelry-Kenh14.vn.mp3") End Sub
全部回答
  • 1楼网友:鸽屿
  • 2021-02-22 23:29
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 List1.ListCount = 0 Then List1.AddItem Dir1.Path & "\" & File1.FileName '增加曲目到列表中 List1.ListIndex = 0 MediaPlayer1.FileName = List1.Text '设置播放曲目 MediaPlayer1.AutoStart = True Else List1.AddItem Dir1.Path & "\" & File1.FileName '增加曲目到列表中 End If End Sub Private Sub List1_Click() Text1.Text = List1.Text End Sub Private Sub MediaPlayer1_PlayStateChange(ByVal OldState As Long, ByVal NewState As Long) '自动循环播放 If MediaPlayer1.PlayState = mpStopped Then If List1.ListIndex < List1.ListCount - 1 Then List1.ListIndex = List1.ListIndex + 1 MediaPlayer1.FileName = List1.Text MediaPlayer1.AutoStart = True End If End If End Sub Private Sub Command1_Click() End End Sub 以上是用WindowsMediaPlayer播放
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯