' 高级声音支持 API Declare Function sndPlaySound Lib "WINMM.DLL" Alias "sndPlaySoundA" _ (lpszSoundName As Any, ByVal uFlags As Long) As LongGlobal Const SND_ASYNC = &H1 ' 异步播放 Global Const SND_NODEFAULT = &H2 ' 不使用缺省声音 Global Const SND_MEMORY = &H4 ' lpszSoundName 指向一个内存文件Sub BeginPlaySound(ByVal ResourceId As Integer) SoundBuffer = LoadResData(ResourceId, "ATM_SOUND")''资源文件里的.wav文件 sndPlaySound SoundBuffer(0), SND_ASYNC Or SND_NODEFAULT Or SND_MEMORY End SubSub EndPlaySound() sndPlaySound ByVal vbNullString, 0& End Sub这个例子来自MSDN的示例文件啊!!
Declare Function sndPlaySound Lib "WINMM.DLL" Alias "sndPlaySoundA" _
(lpszSoundName As Any, ByVal uFlags As Long) As LongGlobal Const SND_ASYNC = &H1 ' 异步播放
Global Const SND_NODEFAULT = &H2 ' 不使用缺省声音
Global Const SND_MEMORY = &H4 ' lpszSoundName 指向一个内存文件Sub BeginPlaySound(ByVal ResourceId As Integer)
SoundBuffer = LoadResData(ResourceId, "ATM_SOUND")''资源文件里的.wav文件
sndPlaySound SoundBuffer(0), SND_ASYNC Or SND_NODEFAULT Or SND_MEMORY
End SubSub EndPlaySound()
sndPlaySound ByVal vbNullString, 0&
End Sub这个例子来自MSDN的示例文件啊!!
要多看book online啊
而且提问前先搜索一下,论坛上这个问题已经好多了
而且提问前先搜索一下,论坛上这个问题已经好多了同感