标题: 让你的ACCESS程序发出声音的函数 [打印本页] 作者: Y.J.Wang 时间: 2002-10-7 00:24 标题: 让你的ACCESS程序发出声音的函数 Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" _
(ByVal filename As String, ByVal snd_async As Long) As Long
Function PlaySound(sWavFile As String)
' Purpose: Plays a sound.
' Argument: the full path and file name.
If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
End If
End Function