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