Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What was the last object I had focus on?
Message
 
 
To
04/08/2010 12:30:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01475139
Message ID:
01475174
Views:
46
>I am trying to gain flow control and perform certain actions based on where the user came from (what was the last object they were on) compared to what they went to (object they are on now), since the user can use the mouse to click on other object outside of the tab order. I created a form property to store the value, but not sure if I want to store the current object name as I loose focus on every object on the form to store the last one in every case, Not efficient. Any ideas on an efficient way to do this?

I forgot exactly how we solved the problem. I do remember we did have the same problem, though. If memory serves right, you can access last object under focus in the button's when event (ActiveControl will still refer to the last control having focus). Although I'm not 100% certain, only 98,9%. I suggest you to test it.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform