首页 > 其他 > 详细

VB播放声音

时间:2017-05-31 11:13:17      阅读:270      评论:0      收藏:0      [点我收藏+]

公共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播放声音

原文:http://www.cnblogs.com/blossomwei/p/6922949.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!