GotFocus

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I have a right-click popup function that
needs to know the name of the control
that has the focus, i.e., the user has
right-clicked on a control, but I don't
know which one?

In the belief that I need some form of
GotFocus, I've so far been unable
to determine the name of the control
that currently has the focus?? This has
to be easy.....been a long day.


Bill
 
Bill said:
I have a right-click popup function that
needs to know the name of the control
that has the focus, i.e., the user has
right-clicked on a control, but I don't
know which one?

In the belief that I need some form of
GotFocus, I've so far been unable
to determine the name of the control
that currently has the focus?? This has
to be easy.....been a long day.

Screen.ActiveControl
 
I have a right-click popup function that
needs to know the name of the control
that has the focus, i.e., the user has
right-clicked on a control, but I don't
know which one?

In the belief that I need some form of
GotFocus, I've so far been unable
to determine the name of the control
that currently has the focus?? This has
to be easy.....been a long day.

Bill

For the name of the control that has the current focus:
Screen.ActiveControl.Name

for the name of the control that had the previous focus:
Screen.PreviousControl.Name
 

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