Delphi Splash Screen

Posted by Delphifreak on October 11, 2002

In Reply to: Please guideme:( posted by Amir Golshan+Amir on October 06, 2002

The following is a clarification of the Delphi 6.0 help file method of creating a splash screen.

DO NOT USE "SplashForm.Free" or such commands as they may cause some processes to end incompletely.
(according to an obscure little blurb I found by accident in the Delphi Help file).

1. First create a new form in your program and name it "SplashScreen" (Use the Name property) and set the "FormStyle" to sStayOnTop.

2. Select the main form of your program place the following in the appropriate places:

     ..., Unit2, ...;  //(or whatever your popup unit number is)
// Under Unit1 place this variable (this is contrary
// to the help file which says...
// "The constant Startup is declared in Form1's interface part".
// This is not a constant!!! As you will see...
  Startup: boolean;
3. Select Project/View Source from the project menu and add the following line between "Application.CreateForm(TSplashScreen, SplashScreen);" and "Application.Run;" :
Startup := True;   

4. Select your SplashScreen form and drag a timer object from the System menu to your form.

5. Set its "Interval" property to 3000 (3 seconds *or* whatever you want).

6. Double click the "OnTimer" event.
Edit it to look like the following:

procedure TSplashScreen.Timer1Timer(Sender: TObject);

To make the splash screen not show the title bar, place a panel or graphic on your form and then click the form.
Set the form "BorderStyle" Property to "bsNone"


this article is a copy of an article i found on d-tnt maybe it helps you

good luck

Related articles

    Splash screen


Delphi Forum :: Tutorials :: Source code :: Tips