新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Sub Command1_Click()
    'Syntax BEEP FREQUENCY, DURATION
    Beep 1000, 300
    Beep 1200, 300
    Beep 1400, 300
    Beep 1600, 300
    Beep 1800, 300
    Beep 2000, 600
    Beep 1800, 300
    Beep 1600, 300
    Beep 1400, 300
    Beep 1200, 300
    Beep 1000, 300
End Sub测试通过,有声音出来哦。
