播放 WAV 文件

页面导航:首页 > 软件编程 > vb.net > 播放 WAV 文件

播放 WAV 文件

来源: 作者: 时间:2016-02-05 12:32 【

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

 

         

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

Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<