Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a Delphi Splash Screen to run...

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
I have a quick question that could be answer in five minutes but as an idiot i don't know how to do it.

I have a program which i want to have a classy little splash screen to come up before hand.

I have the splash screen made and it is called: "FWSplashScreen.dfm"

Is there a way that the 'Delphi 7' program can load up and display the splash screen for about ten seconds. With a progress bar slowly ticking through.

PROJECT NAME:
FWSystem

PROJECT MAINMENU:
FWMainMenu.dfm

PROJECT SPLASH SCRREN:
FWSplashScreen.dfm


Thanks All,
Paid The Umpire.
 
A combination of a timer component and a progress bar component, use the timer to increment it and then go to the main program when it hits 100.
 
yes i know that, but my main question is to make it work.

i have got that so far but when i try and close my program with the code:

begin
close
end;

it doesn't close fully, it just closes the window and then reopens it after about a second.
 
In the project source code, remove the splash screen form from the creation section and add the following code.

Code:
MySplashForm := TMySplashForm.Create(Application);
MySplashForm.Show;
MySplashForm.Update;
Application.Initialize;

Form creation code

MySplashForm.Hide;
MySplashForm.Free;
Application.Run

The Inititalize and Run commands will both already be there, I have just added them so that you can see where to add the code. If you are unsure of how to view your applications source code, go to Project on the menu bar and select View Source


When your feeling down and your resistance is low, light another cigarette and let yourself go [rockband]
 
I just have it in the creation list and as the default form, that way when the time runs out you just close it and disable the timer (and open the other form obviously).
 
I am still having problems here as when i close the program when it is opened as an .exe it is still not fully closing, it is still open in the background as i can see it in the 'Processes' part of the Windows Task Manager, any ideas?
 
Unless you fully close the first window that is opened then the program stay open even if nothing is visible. When you want the program to properly end you can call

Code:
Application.Temrinate;

from anywhere and that'll do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top