怎么用vb使主机蜂鸣

RT就是使主机发出报警的声音
2024-12-18 05:23:52
推荐回答(4个)
回答1:

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

Private Sub Form_Load()
playsnd 440, 100
playsnd 494, 100
playsnd 554, 100
playsnd 622, 100
playsnd 698, 100
playsnd 784, 100
playsnd 880, 100
End Sub

Function playsnd(ByVal x As Long, y As Long)
Beep x, y * 3
DoEvents
End Function

回答2:

Beep() 函数

回答3:

看api手册,找到beep
beep 频率,长度

回答4:

?????????????????????????????????????????