[Lazarus] Initializing my App
Valdas Jankūnas
zmuogs at gmail.com
Tue Oct 28 19:42:22 CET 2008
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
More information about the Lazarus
mailing list