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