Nello

I prob should have been more specific (and as a result appear less dim)

I have a TPanel which has dynamically created forms as its Controls

Form := TForm.Create(Application);
Form.Parent := Panel;
Form.Align := alClient;
etc

I then have a navigator comp which make on of the forms visible above the
others Using Form.Show
Since all the forms are visible and not the 'ParentForm' I dont get
Deactivate/Activate/visiblity Messages as
I am only changing their Z order

Also I think the form having a parent confuses things!

Thanks
Neven

----- Original Message -----
From: Nello Sestini <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Friday, 20 October 2000 15:34
Subject: Re: [DUG]: Last Active Control on a form


> 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"
>

---------------------------------------------------------------------------
    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