[Lazarus] What is main form? (Splash question)

Vojtěch Čihák vojtech.cihak at atlas.cz
Fri May 8 17:46:10 CEST 2015


Hi,
 
what is main form from POV of Lazarus?
I made this demo:
 
program project1;
{$mode objfpc}{$H+}
 
uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  sysutils,
  Interfaces, // this includes the LCL widgetset
  Forms, Unit1, Unit2, Unit3
  { you can add units after this };
 
{$R *.res}
 
begin
  RequireDerivedFormResource:=True;
  Application.Initialize;
 // Application.CreateForm(TFrmSplash, FrmSplash);
 // sleep(750);
  Application.CreateForm(TFrmMain, FrmMain);
  Application.CreateForm(TForm3, Form3);
 // FrmSplash.Free;
  Application.Run;
end.
        
It works well, i.e. when I close FrmMain, the application is correctly terminated.
But when I uncomment those three lines, i.e. I add the splash screen to application, I got troubles.
Splash screen is displayed, both forms too but when I close FrmMain, Form3 persists.
When I close Form3, application is not terminated although there is no remaining form.
Lazarus title bar still shows "(debugging)" and I have to use menu Project->Stop.
It seems that after adding splash screen is FrmMain no longer considered as a main form.
Is it bug? Or do I something wrong?
 
Thanks for help,
 
V.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150508/83b0c4ba/attachment-0002.html>


More information about the Lazarus mailing list