private void textBox1_KeyDown(object sender, KeyEventArgs e) { //Se apertou o enter if (e.KeyCode == Keys.Enter) { //enter key is down this.doSomething();//some commands you want to execute. e.Handled = true; e.SuppressKeyPress = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)