cwolgamott
Programmer
Hello. I am modifying a form in Delphi, so that a splash screen will appear, show another form, and then have the splash screen go away. Currently the splash screen appears, then the second form displays, but the splash screen never disappears from behind the second form. Here is the code that displays the splash screen and creates the forms:
//added for splash screen
fsplash := TfSplash.Create(application);
fsplash.Show;
fsplash.Refresh;
//show the screen for 5 seconds
sleep(5000);
fsplash.Hide;
fsplash.Free;
Application.Initialize;
Application.Title := 'GLE Help Desk';
Application.CreateForm(TfMainMenu, fMainMenu);
Application.CreateForm(TAboutBox, AboutBox);
Application.CreateForm(Tfopencase, fopencase);
Application.CreateForm(Tfpriority, fpriority);
Application.CreateForm(Tfrparameters, frparameters);
Application.CreateForm(Tfupdatecomments, fupdatecomments);
Application.CreateForm(Tfusersearch, fusersearch);
Application.CreateForm(Tfcaseresolution, fcaseresolution);
Application.CreateForm(Tfsplash, fsplash);
Application.Run;
I also tried the following code in the FormOpen procedure to free up the resources used by the splash screen:
if (userok = true) then
begin
//free splash screen
fsplash.Free;
//display users cases
myopencases.Execute;
end
else
fmainmenu.close;
I would greatly appreciate any suggestions. Thank you.
//added for splash screen
fsplash := TfSplash.Create(application);
fsplash.Show;
fsplash.Refresh;
//show the screen for 5 seconds
sleep(5000);
fsplash.Hide;
fsplash.Free;
Application.Initialize;
Application.Title := 'GLE Help Desk';
Application.CreateForm(TfMainMenu, fMainMenu);
Application.CreateForm(TAboutBox, AboutBox);
Application.CreateForm(Tfopencase, fopencase);
Application.CreateForm(Tfpriority, fpriority);
Application.CreateForm(Tfrparameters, frparameters);
Application.CreateForm(Tfupdatecomments, fupdatecomments);
Application.CreateForm(Tfusersearch, fusersearch);
Application.CreateForm(Tfcaseresolution, fcaseresolution);
Application.CreateForm(Tfsplash, fsplash);
Application.Run;
I also tried the following code in the FormOpen procedure to free up the resources used by the splash screen:
if (userok = true) then
begin
//free splash screen
fsplash.Free;
//display users cases
myopencases.Execute;
end
else
fmainmenu.close;
I would greatly appreciate any suggestions. Thank you.