Dave Coventry rašė: > Hi, > > How can I tell when my application has loaded and I can start > initializing some of the form elements? > > At the moment I place all of the initialization routines in the > FormCreate but quite often I get an 'external SIGSEHV' exception as > the mouse generates a false onSelection event on a StringGrid, > presumably because the StringGrid has yet to be fully loaded.
If form is non modal then I do that in OnShow event, like this: // when form appears procedure TfrMain.FormShow(Sender: TObject); const SHOWED_FIRST_TIME: Boolean=False; begin if (not SHOWED_FIRST_TIME) then begin SHOWED_FIRST_TIME:=True; // initializing end; end; -- Valdas Jankūnas _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus