@manhng

Welcome to my blog!

Code WinForms

November 11, 2017 11:27

TextBox: GotFocus in WinForms

textBox1.GotFocus += textBox1_GotFocus;

 

Enter & Tab in WinForms

+ In the properties of your form, set the KeyPreview property of the form to true.

+ private void [YourFormName]_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { SendKeys.Send("{TAB}"); } }

Categories

Recent posts