VB 程序设计

10个成员

利用API函数播放Wav声音文件

发表于 2016-12-19 2857 次查看
Private Declare Function sndPlaySound Lib "Winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String,ByVal uFlags As Long) As Long

Private Sub Cmdplay_Click()
Dim SoundFile As String, Result As Long
SoundFile = "C:\Pwin98\Media\The Microsoft Sound.WAV"
Result = sndPlaySound(SoundFile, 1)
End Sub

 

发表回复
你还没有登录,请先登录注册