Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Sub Command1_Click()
For c = 10 To 0 Step -1
f = Rnd * 3000 + 1000
Form1.Caption = CStr(c) + ":" + CStr(f)
Beep f, 1000
Next c
End Sub
生成exe,其他电脑可以直接运行。
为啥声音很小呢?