当前位置:编程学习 > VB >>

播放 WAV 文件

 

         

Public Declare Function sndPlaySound& Lib "winmm.dll" Alias"sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long)

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

 

 

Sub PlayWav(SoundName As String)

Dim tmpSoundName As String

Dim wFlags%, X%

tmpSoundName = pathWavFiles & SoundName

wFlags% = SND_ASYNC Or SND_NODEFAULT

X% = sndPlaySound(tmpSoundName, wFlags%)

End Sub

补充:软件开发 , Vb ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,