VB 声音提示

VB 声音提示,第1张

概述Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long Private Sub Form_Load() playsnd 587, 100: playsnd 784, 100: playsnd 880, 100: playsnd 988, 100:: p Private Declare Function Beep lib "kernel32" (ByVal DWFreq As Long,ByVal DWDuration As Long) As Long
Private Sub Form_Load() playsnd 587,100: playsnd 784,100: playsnd 880,100: playsnd 988,100:: playsnd 988,200: playsnd 0,100 playsnd 988,100: playsnd 1047,200: playsnd 988,100 playsnd 880,100: playsnd 100,150: playsnd 880,100: playsnd 0,(5) playsnd 988,(5)::: playsnd 988,(5):::: playsnd 988,100 playsnd 784,100: playsnd 740,200: playsnd 100,200:: playsnd 784,100:: playsnd 0,100 playsnd 0,100: playsnd 587,100:: playsnd 784,100: playsnd 1175,(5)::: playsnd 1175,99: playsnd 988,(5) playsnd 987,(5):::: playsnd 784,200 playsnd 784,(5)::: playsnd 784,50:: playsnd 659,(50) playsnd 784,100: playsnd 659,100:: playsnd 100,110 playsnd 784,120: playsnd 880,130: playsnd 740,140: playsnd 784,200:: playsnd 1,1::::: playsnd 1,1 End Sub
Function playsnd(ByVal x As Long,y As Long) Beep x,y * 3 DoEvents End Function

------------------------------------------------- ----- ----------------- Beep不行,用API。引用: Public Declare Function mciSendString lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String,ByVal lpstrReturnString As String,ByVal uReturnLength As Long,ByVal hwndCallback As Long) As Long 例子: mciSendString "close C:\windows\Media\onestop.mID",vbNullString,0 mciSendString "open C:\windows\Media\onestop.mID",0 mciSendString "play C:\windows\Media\onestop.mID",0 总结

以上是内存溢出为你收集整理的VB 声音提示全部内容,希望文章能够帮你解决VB 声音提示所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1276238.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存