Howto disble beep when enter key pressed

  • Thread starter Thread starter K E Senthil Kumar
  • Start date Start date
K

K E Senthil Kumar

I use this code to find a record. I want to beep a sound when no record is
found. But even when the record is found, the beep is sounding. What is
wrong with the code here

Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown

If e.KeyCode = Keys.Enter Then

e.Handled = True

FindRecord()

End If

End Sub

thanks

Senthil Kumar
 
thank you. In the key down event, still the beep is coming, so i used
key press event handler and now it is working fine.

thanks for the assist.

senthil kumar
 
Back
Top