I have a menu option to display the FontDialog on my Visual Studio .NET Windows Form. How can I determine what text field is on my form has focus, so I know where to apply the selections made on the FontDialog screen? For example, I have several fields for remarks on my form and don't know which field the user was in when he selected the Format -> Font menu option. I want to apply the font selections to the field with current focus only.
As System.Windows.Forms.Form is derived from System.Windows.Forms.ContainerControl, you can use the ActiveControl property to get or set the active control on the form.
Dig Deeper on Win Development Resources
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.