[lazarus] splash screen idea
Tony Maro
tony at maro.net
Fri Dec 19 01:13:59 EST 2003
>
> Thanks but I can not understand what the lazarus.pp does with
> the splash
CheckBook Tracker has one as well. It's implemented the same way as in
Delphi.
http://tony.maro.net/mod.php?mod=downloads&op=showcat&id=1&level=1
Make sure you tell it to NOT auto-create the splash form or you'll get
two copies.
Then do something like this in the .lpr file:
Application.Initialize;
FrmSplash := TFrmSplash.Create(Application);
FrmSplash.Show;
FrmSplash.Refresh;
Application.Processmessages; // won't paint content otherwise...
// next is the apps MAIN form... When closed, the app closes
// this is determined by it being the first called with CreateForm.
// so you DO NOT want to call the splash that way.
Application.CreateForm(TFrmMain, FrmMain);
Application.CreateForm(TFrmBalance, FrmBalance); // another form
Application.Run;
In the FrmMain.OnShow event, make sure you call FrmSplash.Close
-Tony Maro
More information about the Lazarus
mailing list