Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restoring the focus
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00093549
Message ID:
00093686
Views:
31
>I want to set the focus back to the previous active control
>when a button is pushed.
>
>How can I know which is the previous active control?

In your base textbox, editbox, etc. classes, add the following code to their
LostFocus events.
ThisForm.oLastCtl = This
In your button's Click event:
* Your code here
ThisForm.oLastCtl.SetFocus()
In your base form class, add oLastCtl as a custom property and add the
following to the Unload event:
ThisForm.oLastCtl = .NULL.
This was done on the fly, without testing, but it should get you pointed
in the right direction...
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform