Q. Where is the best place to open a splash screen on program start up?
A. The best place to open a splash screen is in the project source file after the first FormCreate and before the Run This is accomplished by creating a form on the fly and then displaying it before the app is actual opened.
program Project1;
uses Forms, Unit1 in 'UNIT1.PAS' {Form1}, Splash;
{$R *.RES}
var
SplashScreen : TSplashScreen; {in the Splash unit}
begin
try
SplashScreen := TSplashScreen.Create(Application);
SplashScreen.Show;
SplashScreen.update; {To paint the splash screen}
Application.CreateForm(TForm1, Form1);
{
do other CreatForms or any other processing
before the app is to be opened
}
SplashScreen.Close;
finally {Make sure the splash screen gets released}
SplashScreen.Free;
end;
Application.Run;
end.