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