I tried this code:
private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (Convert.ToInt32(e.KeyChar) == 13) { MessageBox.S
private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { MessageBox.Show("Enter Key Pressed"); } }
This allows you to choose the specific Key you want, without finding the char value of the key.