关于API函数mciSendString在vb中MP3播放的问题
我用这个函数一开始可以,后来不出声了。代码:OptionExplicitPrivateDeclareFunctionmciSendStringLib"winmm.dll"...
我用这个函数一开始可以,后来不出声了。
代码:
Option Explicit
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Sub Command1_Click()
mciSendString "play E:\新建文件夹\下载文件\下载\文件\20081101203006.mp3", vbNullString, 0, 0
End Sub
Private Sub Command2_Click()
mciSendString "pause E:\新建文件夹\下载文件\下载\文件\20081101203006.mp3", vbNullString, 0, 0
End Sub
怎么办!!! 展开
代码:
Option Explicit
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Private Sub Command1_Click()
mciSendString "play E:\新建文件夹\下载文件\下载\文件\20081101203006.mp3", vbNullString, 0, 0
End Sub
Private Sub Command2_Click()
mciSendString "pause E:\新建文件夹\下载文件\下载\文件\20081101203006.mp3", vbNullString, 0, 0
End Sub
怎么办!!! 展开
1个回答
2013-11-05
展开全部
您没有设置关闭,所以再次播放时候出错您可以参照此例子 http://tieba.baidu.com/f?kz=122934702
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询