Showing own logo on start-up

From: "Mark R. Holbrook" <markh@sysdyn.com>

It's pretty simple.

Create a form and put the logo on it using a Timage component. My example below assumes you have created a logo form called "logoform" Go to your project options and set the form to NOT be autocreated.

Then in your PROJECT.DPR file just after the begin statement do something like the following:

 


   logoform := TLogoform.Create(nil);

   logoform.Show;            { NOTE! show!   NOT showmodal }

 

   .

   . { Do other app startup stuff here like open databases etc... }

   .

 

   .  { Just after the block of code that creates all your forms and

         before the Application.Run statement do: }

 

   logoform.Hide;

   logoform.Release;

 


This will display your logo form until you actually start the app running.

 

np:  //to działa !!!

 

program EasySpeaker;

 

uses

  Forms, sysutils,

  Unit1 in 'Unit1.pas' {Form1},

  main in 'main.pas' {fmMAIN},

  msg in 'msg.pas' {fmMESSAGE},

  url in 'url.pas' {Instal},

  lcd in 'lcd.pas' {Form2},

  Unit3 in 'Unit3.pas' {logoform};

 

{$R *.RES}

 

begin

 logoform:= Tlogoform.Create(nil);

  logoform.Show;

  logoform.Update;

  sleep(2000);                 //ZWŁOKA Z UTWORZENIEM FORMY GŁÓWNEJ

  Application.Initialize;

  Application.CreateForm(TForm1, Form1);

  Application.CreateForm(TForm2, Form2);

  Application.CreateForm(TInstal, Instal);

  Application.CreateForm(TfmMESSAGE, fmMESSAGE);

  Application.CreateForm(TfmMAIN, fmMAIN);

  logoform.Release;

  Application.Run;

end.

 

PAMIETAJ ZADEKLAROWAĆ SYSUTILS !!!

 

 

Można ustawić właściwości logoform na :

logoform.style:= stay on top  // w properties