#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    1
    Rep Power
    0

    Add splash screen to program.exe not in project


    hello there..

    first i'm a new here...
    and also new in delphi..

    ok here we go..

    we all know that we can add watermark in image or picture...

    can i do this in .exe? what i mean is adding splash screen in .exe before the main exe execute splashscreen will show for about 5 seconds.

    for example my old project made in vb6 (test.exe) and i lost my source code.

    i want to add splash screen without putting the test.exe inside the resources and call it...

    is it possible?

    thanks in advance..
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,607
    Rep Power
    4247
    1. Create a new form in your project and drop components on it to make it look like a cool splashscreen. The main things to note is to change the BorderStyle property to bsNone and change its Position property to center in the screen. I'm assuming you've named your form as frmSplashScreen here.

    2. Go to Project --> Options and move frmSplashScreen from the Auto-create listbox to the Available Forms listbox.

    3. Click Project --> View Source and in this code, you should see some lines:
    Code:
    Application.Initialize;
    ... code to create a bunch of forms here....
    Application.Run;
    4. Change the code to read like this:
    Code:
    frmSplashScreen := TFrmSplashScreen.Create(Application);
    frmSplashScreen.Visible := true; // or frmSplashScreen.Show;
    frmSplashScreen.Update;
    Sleep(5000); // Sleep for 5 seconds
    
    Application.Initialize;
    
        ... code to create the bunch of forms here ...
    
    frmSplashScreen.Close;
    frmSplashScreen.Free;
    
    Application.Run;
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo