home *** CD-ROM | disk | FTP | other *** search
/ PC Expert 29 / Pce29cd.iso / RUNIMAGE / DELPHI40 / DEMOS / IPCDEMOS / ABOUT.PAS < prev    next >
Pascal/Delphi Source File  |  1998-06-16  |  858b  |  50 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. procedure ShowAboutBox;
  32. begin
  33.   with TAboutBox.Create(Application) do
  34.   try
  35.     ShowModal;
  36.   finally
  37.     Free;
  38.   end;
  39. end;
  40.  
  41. procedure TAboutBox.FormCreate(Sender: TObject);
  42. begin
  43.   Caption := Format('About %s', [Application.Title]);
  44.   ProgramIcon.Picture.Assign(Application.Icon);
  45.   ProgramName.Caption := Application.Title;
  46. end;
  47.  
  48. end.
  49.  
  50.