[求助]怎么让程序正常运行时计算机鸣叫一声?
我按照MSDN上的那个实例直接用Beep但是提示错误“必选参数”怎么能实现这个目的呢?
Private Declare Function Beep Lib "kernel32.dll" (ByVal dwFreq As Long, _
ByVal dwDuration As Long) As Long
Private Declare Function APIBeep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
'可以設置聲音長短
Private Sub Command1_Click()
APIBeep 220, 500
End Sub
'嘀一聲
Private Sub Command2_Click()
Dim Retval As Long
Retval = Beep(800&, 10&)
If Retval = 0 Then
Debug.Print "Beep ist gescheitert"
End If
End Sub