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.
 
Back
Top