question on focus

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

Guest

Hi All,
Is it possible to find which object (textbox,listview etc) has the focus without testing each
and every object on the form.

Thank You.
 
There isn't a one-call way of doing this.
What you can do though is to start from the form's ActiveControl and follow
your way up until your find a control that is not a ContainerControl or a
contianer control's ActiveControl property is *null*.
The last control you find (that is not a container or its activecontrol is
*null*) has the focus.
 
Back
Top