VB怎么在单击每个按钮 都播放不同的声音

在三个按钮当中VB怎么在单击每个按钮都播放不同的声音代码,谢谢... 在三个按钮当中 VB怎么在单击每个按钮 都播放不同的声音
代码,谢谢
展开
 我来答
norman0551
2010-05-27 · 超过11用户采纳过TA的回答
知道答主
回答量:50
采纳率:0%
帮助的人:0
展开全部
不同的按钮 单击事件 运行不同的声音,并且,BUTTON1运行
其他BUTTON.end
就是了
匿名用户
2010-05-27
展开全部
Private Const SND_APPLICATION = &H80 ' look for application specific association
Private Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry
Private Const SND_ALIAS_ID = &H110000 ' name is a WIN.INI [sounds] entry identifier
Private Const SND_ASYNC = &H1 ' play asynchronously
Private Const SND_FILENAME = &H20000 ' name is a file name
Private Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Private Const SND_MEMORY = &H4 ' lpszSoundName points to a memory file
Private Const SND_NODEFAULT = &H2 ' silence not default, if sound not found
Private Const SND_NOSTOP = &H10 ' don't stop any currently playing sound
Private Const SND_NOWAIT = &H2000 ' don't wait if the driver is busy
Private Const SND_PURGE = &H40 ' purge non-static events for task
Private Const SND_RESOURCE = &H40004 ' name is a resource name or atom
Private Const SND_SYNC = &H0 ' play synchronously (default)
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

Private Sub Command1_Click()
PlaySound "D:\GreenSoft\QQ\sound\system.wav", ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Command2_Click()
PlaySound "D:\GreenSoft\QQ\sound\msg.wav", ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub

Private Sub Command3_Click()
PlaySound "D:\GreenSoft\QQ\sound\up.wav", ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式