Splash.pas
上传用户:dh8233980
上传日期:2014-10-16
资源大小:1015k
文件大小:3k
源码类别:

Email服务器

开发平台:

Delphi

  1. unit Splash;
  2. (******************************************************************************)
  3. (*                                                                            *)
  4. (* Hermes Splash Window (Screen)                                              *)
  5. (* Part of Hermes SMTP/POP3 Server.                                           *)
  6. (* Copyright(C) 2000 by Alexander J. Fanti, All Rights Reserver Worldwide.    *)
  7. (*                                                                            *)
  8. (* Created January 19, 2000 by Alexander J. Fanti.  See License.txt           *)
  9. (*                                                                            *)
  10. (* Used by: Hermes                                                            *)
  11. (*                                                                            *)
  12. (* Description: This is a splash screen displayed by the application as it    *)
  13. (*              starts.                                                       *)
  14. (*                                                                            *)
  15. (* Revisions: 1/21/2000  AJF  Commented                                       *)
  16. (*                                                                            *)
  17. (******************************************************************************)
  18. interface
  19. uses
  20.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  21.   ExtCtrls;
  22. type
  23.   TfrmSplash = class(TForm)
  24.     Image1: TImage;
  25.     Timer1: TTimer;
  26.     procedure Timer1Timer(Sender: TObject);
  27.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  28.     procedure Image1Click(Sender: TObject);
  29.   private
  30.     { Private declarations }
  31.   public
  32.     { Public declarations }
  33.   end;
  34. var
  35.   frmSplash: TfrmSplash;
  36. implementation
  37. {$R *.DFM}
  38. procedure TfrmSplash.Image1Click(Sender: TObject);
  39. begin
  40.   // if the user clicks on it, we presume they don't want it around anymore
  41.   Close;
  42. end;
  43. procedure TfrmSplash.Timer1Timer(Sender: TObject);
  44. begin
  45.   // the form closes after the timer interval.  But the timer's enabled
  46.   // after the app is started, not before.  This allows the form to be
  47.   // seen while everything is initializing, but if we're on a really fast
  48.   // machine, we still see it for the timer interval before it goes away.
  49.   // After all, I spent some time making the pretty graphic and I want
  50.   // people to see it!
  51.   Close;
  52. end;
  53. procedure TfrmSplash.FormClose(Sender: TObject; var Action: TCloseAction);
  54. begin
  55.   // We only show this form once, on startup, so we can free it on close
  56.   Action := caFree;
  57. end;
  58. end.