Detecting focus target

A

Atlas

Is there an easy way to detect where the focus will be? Say in a textbox or
in form's lostfocus event...
That would help to understand better where the user is tryng to go, and
allow or not depending on the target object.........
 
M

Mark

You can look at the TabIndex of the current control, add 1 to that (unless you
are on the last control) and the next control to get focus will be the control
with that TabIndex.
 
D

Dirk Goldgar

Atlas said:
Is there an easy way to detect where the focus will be? Say in a
textbox or in form's lostfocus event...
That would help to understand better where the user is tryng to go,
and allow or not depending on the target object.........

Not readily. You can know which is the next or previous control in the
tab order, but you can't know whether the user has used a pointing
device to move to a control out of sequence.
 
A

Atlas

Not readily. You can know which is the next or previous control in the
tab order, but you can't know whether the user has used a pointing
device to move to a control out of sequence.

Exactly!! If you could only know where you're going you could easily decide
if it is allowed or not...
 

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

Top