textbox enter key event code example Example: windows form textbox enter key event if (e.KeyCode == Keys.Enter) { }