VB播放声音
Posted 菜鸟程序猿
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VB播放声音相关的知识,希望对你有一定的参考价值。
公共Modules定义:
Public Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long Public Function EffectSound(Effect As String) As Long On Error Resume Next Dim sEffect As String sEffect = IIf(Right(App.Path, 1) = "\", App.Path, App.Path & "\") & Effect PlaySound sEffect, 0, 0 End Function
Forms中引用:
Call EffectSound("OO.wav")
以上是关于VB播放声音的主要内容,如果未能解决你的问题,请参考以下文章