Sub PlayWav(SoundName As String)
Dim tmpSoundName As String
Dim wFlags%, X%
, 声明语句部分 (请置于模块中)
,**********************************
,#If Win32 Then
,Public Declare Function sndPlaySound& Lib "winmm.dll" Alias
"sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long)
,#Else
,Public Declare Function sndPlaySound% Lib "mmsystem.dll" (ByVal
lpszSoundName As String, ByVal uFlags As Integer)
,#End If
,WIN32
, **********************************
, WAV Sound values
,Global Const SND_SYNC = &H0
,Global Const SND_ASYNC = &H1
,Global Const SND_NODEFAULT = &H2
,Global Const SND_LOOP = &H8
,Global Const SND_NOSTOP = &H10
, **********************************
, *** pathWavFiles 是声音文件存放的路径
tmpSoundName = pathWavFiles & SoundName
wFlags% = SND_ASYNC Or SND_NODEFAULT
X% = sndPlaySound(tmpSoundName, wFlags%)
End Sub
文章来源于领测软件测试网 https://www.ltesting.net/
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073










