[SOLVED] Splash Screen lazarus / 31-LCL ---------------------------------------------------------------------- Pe3s · 2022-04-22 14:31 Hello, how can I make the Welcome Screen, I tried to insert the code in the project source but there is an error Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  FSplash := TFSplash.Create(Application);  FSplash.Show;  Application.Initialize; How can I display the splash form before the main program form? ---------------------------------------------------------------------- Blaazen · 2022-04-22 14:53 What error? I have this (in *.lpr), it works: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   RequireDerivedFormResource:=True;  Application.Initialize;    FrmSplash:=TFrmSplash.Create(nil);  FrmSplash.Show;  Application.ProcessMessages;    Application.CreateForm(TFrmMain, FrmMain);     FrmMain.Show;  FreeThenNil(FrmSplash);  Application.Run; ---------------------------------------------------------------------- Pe3s · 2022-04-22 15:37 Error  Execution Stopped with exit-code 217 ($00D9) ---------------------------------------------------------------------- wp · 2022-04-22 16:50 In the attachment there is a tested demo. To see something happening I added a progress bar to the splash form (I did not use a TProgressbar because it causes trouble sometimes). ---------------------------------------------------------------------- Pe3s · 2022-04-22 17:49 Thank you @wp, I will look for the error at my place ---------------------------------------------------------------------- howardpc · 2022-04-22 19:01 @wp For some reason in your attachment the splash form .lfm is named usplash.lfm while the unit's .pas is named uSplash.pas. On Windows this does not matter, but on Mac and Linux the project will not compile unless you rename the usplash.lfm to uSplash.lfm. ---------------------------------------------------------------------- wp · 2022-04-22 20:09 Howard, thanks for the hint. Creating this project was a bit chaotic because I fell into the trap again that a SaveAs does not necessarily refer to the file visible in the editor. This way I saved the project under the wrong name and had a lot to do to repair the project again. This must have been where the error crept in. ---------------------------------------------------------------------- PascalDragon · 2022-04-23 10:18 Quote from: Pe3s on April 22, 2022, 04:31:28 pmHello, how can I make the Welcome Screen, I tried to insert the code in the project source but there is an error Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  FSplash := TFSplash.Create(Application);  FSplash.Show;  Application.Initialize; A part of your problem is that you need to insert your code after Application.Initialize. There might be other issues as well as I usually don't work with splash screens, but that one is definitely an issue.