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.
 

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