Beginner here and need a little guidance. I've been banging my head against the wall trying to figure out a simple keypress handling event.
I have the code working fine after hunting for a couple of days on the net but have a problem getting rid of the obnoxious bong that comes along with hitting the ENTER key.
I've attempted some solutions on the web about changing the KeyAscii to 0 but under that method I cannot even get the program to recognize the key is even being pressed. If someone can point me in the right direction I would really appreciate it.
The code I have so far is as follows and I'm just trying to get rid of the audible bong.
I have the code working fine after hunting for a couple of days on the net but have a problem getting rid of the obnoxious bong that comes along with hitting the ENTER key.
I've attempted some solutions on the web about changing the KeyAscii to 0 but under that method I cannot even get the program to recognize the key is even being pressed. If someone can point me in the right direction I would really appreciate it.
The code I have so far is as follows and I'm just trying to get rid of the audible bong.
VB.NET:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(Keys.Enter) Then
Call Button1_Click(sender, e)
End If
End Sub
Last edited: