Office中国论坛/Access中国论坛

标题: 让你的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

调用方法:PlaySound "文件名.WAV"
作者: cg1    时间: 2002-10-7 01:12
真是爱死你了,太太太太好了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
作者: Y.J.Wang    时间: 2002-10-7 01:57
要爱就爱老外吧,哈哈
作者: WTM1    时间: 2002-10-8 19:05
谢谢!!
作者: 好运牛    时间: 2013-12-3 21:17
感谢分享,太棒了
作者: ljp518    时间: 2013-12-4 13:29
{:soso_e163:}




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3