请问怎样在vb中实现按下按钮就播放一个音频文件,不过不要调用播放器!
展开全部
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 "open ""F:\Program Files\Netease\popo2004\wave\RevMsg.wav"" alias music", vbNull, 0, 0
mciSendString "play music", vbNull, 0, 0
End Sub
Private Sub Command1_Click()
mciSendString "open ""F:\Program Files\Netease\popo2004\wave\RevMsg.wav"" alias music", vbNull, 0, 0
mciSendString "play music", vbNull, 0, 0
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询