声明API
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
调用:(经过群友指导,使用Chr(34)解决了文件路径包含空格导致播放失败的问题)
Call mciSendString("open " & Chr(34) & mypath & Chr(34) & " type MPEGVideo alias MP3", vbNullString, 0, 0) '打开1.mp3
还有比这个方法更好的吗?
甚至偶尔还会出现“MCI driver is NOT installed.”的错误
Views: 101
邓伟 已回答的问题 2024 年 4 月 21 日
抱歉,你无权阅读评论。