Key clicks possible? PC beep?

  • Thread starter Thread starter Ross
  • Start date Start date
R

Ross

Anyone have any code that will sound a click from the PC speaker with
keystrokes?

Any easy way to get a beep out of the PC speaker (not through the sound
card)?


Thanks,

Ross
 
Hi,

Maybe this will work

Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
Beep()
End Sub

Ken
 
Note that this will only beep the speaker , if your computer does not have a
sound card installed
otherwise the call will be routed to the sound card to handle , well on my
computer the sound is in the evening turned to 0 ( hmm i even noticed it is
now also turned of ) so i will not here the beeps on my computer at all



regards

Michel Posseth
 
Ross said:
Anyone have any code that will sound a click from the PC speaker with
keystrokes?

Any easy way to get a beep out of the PC speaker (not through the sound
card)?

\\\
Private Declare Function Beep Lib "kernel32.dll" ( _
ByVal dwFreq As Int32, _
ByVal dwDuration As Int32 _
) As Boolean
///
 
Private Declare Function Beep Lib "kernel32.dll" ( _
ByVal dwFreq As Int32, _
ByVal dwDuration As Int32 _
) As Boolean

Try dwFreq in the range 40 to 400 and dwDuration 1.
 
Back
Top