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, ) = "\", App.Path, App.Path & "\") & Effect
PlaySound sEffect, ,
End Function

Forms中引用:

Call EffectSound("OO.wav")
上一篇:2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred)


下一篇:eureka服务注册发现流程和核心参数