Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
lpszname 就是要播放的声音文件:wav
hmodule =0
dwflags 为下面:
Private Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Private Const SND_ASYNC = &H1 ' 同步play asynchronously
Private Const SND_SYNC = &H0 ' 异步play synchronously (default)