Board index » delphi » Splash screens

Splash screens

Does anyone know how to display a splash screen in 2 ways.

1) When a database application is initially loading. (My app can take upto a
minute to load on some low spec computers.  A 'program is loading...' screen
would be useful for the users.)

2) When creating reports in Delphi4 (QReports). (Again some master details
reports can take an age and it would be useful to display a 'report is being
generated...' screen.

Any help would be appreciated
Cheers
Clyde

 

Re:Splash screens


Hi Clyde.

Just make a form and display it before executing the Loading processes.

This is how you make a form showmodal by using show (then you can display a
form with a process bar).

procedure TForm1.ShowProgessDlg;
var
  WindowList: pointer;
begin
  WindowList := DisableTaskWindows(Form2.Handle);
  try
    Form2.Show;
    {Loop or processes}
    Form2.Progressbar1.Position := Form2.Progressbar1.Position + 1;
    {End loop or processes}
  finally
    EnableTaskWindows(WindowList);
    Form2.Close;
  end;
end;

Quote
Clyde Dealtry <cl...@alphatech.free-online.co.uk> wrote in message

news:iFHZ2.3196$97.2688@stones...
Quote
> Does anyone know how to display a splash screen in 2 ways.

> 1) When a database application is initially loading. (My app can take upto
a
> minute to load on some low spec computers.  A 'program is loading...'
screen
> would be useful for the users.)

> 2) When creating reports in Delphi4 (QReports). (Again some master details
> reports can take an age and it would be useful to display a 'report is
being
> generated...' screen.

> Any help would be appreciated
> Cheers
> Clyde

Re:Splash screens


Another Idea....

Change your project file to something like this...

begin
Application.Initialize;
Splashfrm := TSplashfrm.Create(Nil);
Splashfrm.Show;
Splashfrm.Update;
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TSetupFrm, SetupFrm);
Splashfrm.Hide;
Splashfrm.Free;
Application.Run;
end;

Claude

Other Threads