On Sat, 01 Mar 2008 11:40:34 -0300 Luiz Americo Pereira Camara <[EMAIL PROTECTED]> wrote:
> Mattias Gaertner wrote: > > On Sat, 1 Mar 2008 13:14:05 +0100 > > zeljko <[EMAIL PROTECTED]> wrote: > > > > > >> I'm creating an customized control, and have such hint when > >> creating form with such control: > >> > >> [HINT] TWinControl.CreateWnd creating Handle during loading > >> Form1:TForm1 csDesigning=False > >> > >> Is this something bad , or I can live with it ? > >> > > > > It's bad. > > It creates a lot of unneeded overhead. > > As long as the control is csloading, csdestroying or not becomes > > visible a Handle is not needed and should not be created. > > > > Use 'if csLoading in ComponentState' to find out if it is still > > loading. Loading is finished when 'procedure Loaded;' is called. You > > can override that. > > > > Is allowed to access Handle at TForm.OnCreate event? Yes, with 'if HandleAllocated then'. Mattias _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
