-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAbout.pas
91 lines (77 loc) · 1.86 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
unit About;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, Buttons;
type
TAbout_Form = class(TForm)
Bevel1: TBevel;
Bevel2: TBevel;
Bevel3: TBevel;
BitBtn1: TBitBtn;
Label1: TLabel;
Version_Lbl: TLabel;
Build_Lbl: TLabel;
Image1: TImage;
Label2: TLabel;
Bevel4: TBevel;
Bevel5: TBevel;
Label3: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label4: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
About_Form: TAbout_Form;
implementation
{$R *.DFM}
procedure TAbout_Form.FormCreate(Sender: TObject);
type
verinfo = record
dwSignature:longint;
dwStrucVersion:longint;
dwFileVersionMS:longint;
dwFileVersionLS:longint;
dwProductVersionMS:longint;
dwProductVersionLS:longint;
dwFileFlagsMask:longint;
dwFileFlags:longint;
dwFileOS:longint;
dwFileType:longint;
dwFileSubtype:longint;
dwFileDateMS:longint;
dwFileDateLS:longint;
end;
var
p:pointer;
pi:^verinfo;
FName:PChar;
len:longint;
i1 : cardinal;
begin
FName:=StrAlloc(Length(Application.EXEName)+1);
StrPCopy(FName,Application.EXEName);
len := GetFileVersionInfoSize(FName, i1);
GetMem(p,len);
GetFileVersionInfo(FName,0,len,p);
VerQueryValue(p,'\',pointer(pi),i1);
Version_Lbl.Caption:='Âåðñèÿ '+IntToStr(HiWord(pi^.dwFileVersionMS))+'.'+
IntToStr(LoWord(pi^.dwFileVersionMS));
Build_Lbl.Caption:='Build '+IntToStr(HiWord(pi^.dwFileVersionLS))+'.'+
IntToStr(LoWord(pi^.dwFileVersionLS));
StrDispose(FName);
FreeMem(p);
end;
end.