VB 添加提示音

方法一:使用 Beep 函数

1 Private Sub Command3_Click()
2 Beep
3 End Sub

方法二:先声明APIBeep,再调用

Private Declare Function APIBeep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

Private Sub Command1_Click()
APIBeep 532, 400
End Sub

说明:此函数是让PC的speaker发出声音。
  参数1:控制声音频率(频率值从 37 到 32767)
  参数2:控制时间,以毫秒为单位

参考1:https://zhidao.baidu.com/question/433784676.html
参考2:https://blog.csdn.net/qq_34333801/article/details/80726911

曲谱节拍简单教学视频:https://baijiahao.baidu.com/s?id=1607858953848120582&wfr=spider&for=pc

原文地址:https://www.cnblogs.com/humor-bin/p/15171732.html