Howto disble beep when enter key pressed

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
 
S

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top