Forum > LCL

[SOLVED] Splash Screen

(1/2) > >>

Pe3s:
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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- FSplash := TFSplash.Create(Application);  FSplash.Show;  Application.Initialize;
How can I display the splash form before the main program form?

Blaazen:
What error?

I have this (in *.lpr), it works:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  RequireDerivedFormResource:=True;  Application.Initialize;    FrmSplash:=TFrmSplash.Create(nil);  FrmSplash.Show;  Application.ProcessMessages;    Application.CreateForm(TFrmMain, FrmMain);     FrmMain.Show;  FreeThenNil(FrmSplash);  Application.Run;

Pe3s:
Error  Execution Stopped with exit-code 217 ($00D9)

wp:
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:
Thank you @wp, I will look for the error at my place

Navigation

[0] Message Index

[#] Next page

Go to full version