private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { var result = textBox1.Text; MessageBox.Show(result.ToString()); } }
private void TextBox1_KeyPress(object sender, KeyPressEventArgs e) { Console.WriteLine(e.KeyChar.ToString()); //You can do other process here e.Handled = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)