Get the control that has the focus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all!

Is there an easy way to get the control that has the focus
on a Windows.Forms.Form?
(besides scanning the .Focused property of all the contained controls)

Thanks in advance!
 
Hi,

Form class does not provide a property which will return the focused
control.

However if you need this for performance purposes, you can set a variable
on GotFocus event of each control and use that value when needed.

Thanks

Ercan Turkarslan
Microsoft Mobile Devices Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top