home *** CD-ROM | disk | FTP | other *** search
/ Delphi Anthology / aDELPHI.iso / Runimage / Delphi50 / Demos / Resxplor / about.pas < prev    next >
Pascal/Delphi Source File  |  1999-08-11  |  971b  |  54 lines

  1. unit About;
  2.  
  3. interface
  4.  
  5. uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
  6.   Buttons, ExtCtrls, SysUtils;
  7.  
  8. type
  9.   TAboutBox = class(TForm)
  10.     OKButton: TButton;
  11.     Panel1: TPanel;
  12.     ProgramIcon: TImage;
  13.     ProgramName: TLabel;
  14.     Copyright: TLabel;
  15.     procedure FormCreate(Sender: TObject);
  16.   private
  17.     { Private declarations }
  18.   public
  19.     { Public declarations }
  20.   end;
  21.  
  22. var
  23.   AboutBox: TAboutBox;
  24.  
  25. procedure ShowAboutBox;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. const
  32.   SCopyright     = 'Copyright ⌐ 1996, 1998 Borland International';
  33.  
  34. procedure ShowAboutBox;
  35. begin
  36.   with TAboutBox.Create(Application) do
  37.   try
  38.     ShowModal;
  39.   finally
  40.     Free;
  41.   end;
  42. end;
  43.  
  44. procedure TAboutBox.FormCreate(Sender: TObject);
  45. begin
  46.   Caption := Format('About %s', [Application.Title]);
  47.   ProgramIcon.Picture.Assign(Application.Icon);
  48.   ProgramName.Caption := Application.Title;
  49.   CopyRight.Caption := SCopyRight;
  50. end;
  51.  
  52. end.
  53.  
  54.