当前位置:编程学习 > 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 © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,