Neven

> I'm trying to save the last focused control on a form so when I reactivate
> it This control has focus


write handlers for the form's FormActivate and FormDeactivate events

FormDeactivate needs to save the value of ActiveControl

FormActiveate needs to restore the value of ActiveControl
(or whatever you're trying to do)

in the form's FormCreate event set Application.OnActivate
to the FormActiveate handler   and set  Application.OnDeactivate
to the FormDeactivate handler.

The form's activate/deactivate events will fire when you
switch between forms of your application.   The Application
events will fire when you switch between applications.
Either way you'll be notified because you have both
situations covered.

-ns

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to