Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lost Focus
Message
From
04/12/1999 18:37:54
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00298783
Message ID:
00298787
Views:
11
>When a control on a form receives focus, is there a way to determine which control lost focus just prior to that event?
>Thanks!

You may have some form custom property e.g. Form.lastactivecontrol and reset it in each Control.Gotfocus event, e.g.
***Control.Gotfocus
=messagebox(thisform.lastactivecontrol.name)
thisform.lastactivecontrol=this

If you use subclassed controls then it can be accomplished easy enough. Do not forget to set This.Lastactivecontrol=.NULL. in form.destroy event.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform