home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / Essentials / SETUP.EXE / %MAINDIR% / EsAbout0.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-11-28  |  2.0 KB  |  93 lines

  1. {*********************************************************}
  2. {*                  ESABOUT0.PAS 1.05                    *}
  3. {*      Copyright (c) 1997-98 TurboPower Software Co     *}
  4. {*                 All rights reserved.                  *}
  5. {*********************************************************}
  6.  
  7. {$I ES.INC}
  8.  
  9. {$B-} {Complete Boolean Evaluation}
  10. {$I+} {Input/Output-Checking}
  11. {$P+} {Open Parameters}
  12. {$T-} {Typed @ Operator}
  13. {$W-} {Windows Stack Frame}
  14. {$X+} {Extended Syntax}
  15.  
  16. {$IFNDEF Win32}
  17.   {$G+} {286 Instructions}
  18.   {$N+} {Numeric Coprocessor}
  19.   {$C MOVEABLE,DEMANDLOAD,DISCARDABLE}
  20. {$ENDIF}
  21.  
  22. unit EsAbout0;
  23.  
  24. interface
  25.  
  26. uses
  27.   {$IFDEF Win32} Windows, {$ELSE} WinTypes, WinProcs, {$ENDIF}
  28.   Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  29.   StdCtrls, DsgnIntf, ExtCtrls, EsData;
  30.  
  31. type
  32.   TEsAboutForm = class(TForm)
  33.     Panel1: TPanel;
  34.     Image1: TImage;
  35.     lblVersion: TLabel;
  36.     btnOK: TButton;
  37.     Bevel1: TBevel;
  38.     procedure btnOKClick(Sender: TObject);
  39.     procedure FormCreate(Sender: TObject);
  40.   private
  41.     { Private declarations }
  42.   public
  43.     { Public declarations }
  44.   end;
  45.  
  46.   TEsVersionProperty = class(TStringProperty)
  47.   public
  48.     function GetAttributes: TPropertyAttributes;
  49.       override;
  50.     procedure Edit;
  51.       override;
  52.   end;
  53.  
  54. implementation
  55.  
  56. {$R *.DFM}
  57.  
  58.  
  59. {*** TEsVersionProperty ***}
  60.  
  61. function TEsVersionProperty.GetAttributes: TPropertyAttributes;
  62. begin
  63.   Result := [paDialog, paReadOnly];
  64. end;
  65.  
  66. procedure TEsVersionProperty.Edit;
  67. begin
  68.   with TEsAboutForm.Create(Application) do begin
  69.     try
  70.       ShowModal;
  71.     finally
  72.       Free;
  73.     end;
  74.   end;
  75. end;
  76.  
  77.  
  78. {*** TEsAboutForm ***}
  79.  
  80. procedure TEsAboutForm.btnOKClick(Sender: TObject);
  81. begin
  82.   Close;
  83. end;
  84.  
  85. procedure TEsAboutForm.FormCreate(Sender: TObject);
  86. begin
  87.   Top := (Screen.Height - Height) div 3;
  88.   Left := (Screen.Width - Width) div 2;
  89.   lblVersion.Caption := 'Version ' + EsVersionStr;
  90. end;
  91.  
  92. end.
  93.