使用API吧
Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Public Const SND_FILENAME = &H20000 ' name is a file name
Public Const SND_ASYNC = &H1 ' play asynchronously
Public Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Public Const SND_PURGE = &H40 ' purge non-static events for task或者直接引用Media Player/Real Player控件吧
Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Public Const SND_FILENAME = &H20000 ' name is a file name
Public Const SND_ASYNC = &H1 ' play asynchronously
Public Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Public Const SND_PURGE = &H40 ' purge non-static events for task或者直接引用Media Player/Real Player控件吧
在工具箱右击打开自定义工具箱,选择windows media player
然后的工作就是拖放了,coding了
选上Windows Media Player
选上RealPlayer G2 Control(如果你安装了Real Player)
确定后就可以在工具箱内找到了....
我做一下再看。zgb2002(爱好者):“...上篇是说VC#的,你还是用VC#开发吧很方便”???