www.pudn.com > EmailServer.zip > Splash.pas


unit Splash; 
 
(******************************************************************************) 
(*                                                                            *) 
(* Hermes Splash Window (Screen)                                              *) 
(* Part of Hermes SMTP/POP3 Server.                                           *) 
(* Copyright(C) 2000 by Alexander J. Fanti, All Rights Reserver Worldwide.    *) 
(*                                                                            *) 
(* Created January 19, 2000 by Alexander J. Fanti.  See License.txt           *) 
(*                                                                            *) 
(* Used by: Hermes                                                            *) 
(*                                                                            *) 
(* Description: This is a splash screen displayed by the application as it    *) 
(*              starts.                                                       *) 
(*                                                                            *) 
(* Revisions: 1/21/2000  AJF  Commented                                       *) 
(*                                                                            *) 
(******************************************************************************) 
 
interface 
 
uses 
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 
  ExtCtrls; 
 
type 
  TfrmSplash = class(TForm) 
    Image1: TImage; 
    Timer1: TTimer; 
    procedure Timer1Timer(Sender: TObject); 
    procedure FormClose(Sender: TObject; var Action: TCloseAction); 
    procedure Image1Click(Sender: TObject); 
  private 
    { Private declarations } 
  public 
    { Public declarations } 
  end; 
 
var 
  frmSplash: TfrmSplash; 
 
implementation 
 
{$R *.DFM} 
 
procedure TfrmSplash.Image1Click(Sender: TObject); 
begin 
  // if the user clicks on it, we presume they don't want it around anymore 
  Close; 
end; 
 
procedure TfrmSplash.Timer1Timer(Sender: TObject); 
begin 
  // the form closes after the timer interval.  But the timer's enabled 
  // after the app is started, not before.  This allows the form to be 
  // seen while everything is initializing, but if we're on a really fast 
  // machine, we still see it for the timer interval before it goes away. 
  // After all, I spent some time making the pretty graphic and I want 
  // people to see it! 
  Close; 
end; 
 
procedure TfrmSplash.FormClose(Sender: TObject; var Action: TCloseAction); 
begin 
  // We only show this form once, on startup, so we can free it on close 
  Action := caFree; 
end; 
 
 
end.