Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

Why does calling Focus() on a control not set focus on it?

When you call the Focus method on a control, the control must be visible; otherwise focus will not be set. For example, if you call Focus on a control in Form_Load then focus will not be set. Instead consider setting the control's TabIndex property so that it will be the first control to receive focus.

Contributed from George Shepherd's Windows Forms FAQ