-
Notifications
You must be signed in to change notification settings - Fork 0
/
ABOUT.PAS
44 lines (34 loc) · 884 Bytes
/
ABOUT.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
unit ABOUT;
interface
uses Winapi.Windows, System.Classes, System.SysUtils, Vcl.Forms, Vcl.Controls,
Vcl.StdCtrls, Vcl.Buttons, Vcl.ExtCtrls, Vcl.Graphics;
type
TAboutBox = class(TForm)
Panel1: TPanel;
OKButton: TButton;
ProgramIcon: TImage;
ProductName: TLabel;
Version: TLabel;
Copyright: TLabel;
Comments: TLabel;
procedure FormCreate(Sender: TObject);
private
version_: LongRec;
function GetVersion: string;
public
{ Public-Deklarationen }
end;
var
AboutBox: TAboutBox;
implementation
{$R *.dfm}
procedure TAboutBox.FormCreate(Sender: TObject);
begin
version_ := LongRec(GetFileVersion(ParamStr(0)));
version.Caption := 'Version ' + GetVersion;
end;
function TAboutBox.GetVersion: string;
begin
Result := Format('%d.%d', [version_.Hi, version_.Lo]);
end;
end.