I made a quick web browser in vb.net, I have it so that when you press enter it navigates to the webpage in textbox1. The only thing is that it beeps everytime I press enter. I tried using e.Handled = True, but it hasn’t done anything. Here is my code for the keypress
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
WebBrowser1.Navigate(TextBox1.Text)
End If
End Sub
I thought e.Handled would have made that annoying beep go away, but it hasn’t.
The
KeyEventArgsProperty that you are wanting is not Handled but SuppressKeyPress.i.e.
From the first MSDN Link: