[DUG] Delphi internals - form events

Matt Comb matt at ferndigital.com
Wed Aug 10 14:50:27 NZST 2005


Hi John, yer its the same case in Delphi.

I normally have a flag initialised:boolean and then in the formactivate do
if (not initialised) then begin
  initialised:=true;
  do your stuff.
end;

so you know its only occurring once.

Matt.

----- Original Message ----- 
From: "John Bird" <johnkbird at paradise.net.nz>
To: "'NZ Borland Developers Group - Delphi List'" <delphi at ns3.123.co.nz>
Sent: Wednesday, August 10, 2005 2:41 PM
Subject: [DUG] Delphi internals - form events


> Form create versus activate.
>
> If I understand correctly, program initialisation best goes into the 
> create
> event.  I have worked out that the onactivate event for a main form fires
> every time any second form closes and focus returns to the main form.  Is
> there any limitation about what can be put in the create event, I am
> wondering because before Delphi I did some FoxPro and there was some 
> things
> to do with eg visual properties of components that could not be put in the
> Create event as they didn't really exist yet....such things as (I think)
> button1.visible:=false.  Does Delphi have this kind of limitation or
> anything you cannot do when the form is created but before it is shown? 
> Any
> general hints of what to put in each event would be appreciated.
>
> Thanks
>
> John B
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.2/65 - Release Date: 07/08/2005
>
> 



More information about the Delphi mailing list