CommanderLiamTHX
In Runtime
- Messages
- 133
- Location
- required
Hi, I'm making a Web Browser in Visual Studio 2008 and I have it so you can press enter instead of clicking 'Go.' But there's one problem: it still plays the error noise when I click. Is there any way I can fix this?
My code:
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then 'Chr(13) is the Enter Key
'Runs the Button1_Click Event
Button6_Click(Me, EventArgs.Empty)
End If
My code:
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then 'Chr(13) is the Enter Key
'Runs the Button1_Click Event
Button6_Click(Me, EventArgs.Empty)
End If