mirror of
https://github.com/ngeor/Chameleon.git
synced 2025-12-19 09:53:43 +01:00
Dynamically showing the version in the about box
This commit is contained in:
parent
90991c865d
commit
af4fd0bee2
@ -10,6 +10,7 @@ object AboutBox: TAboutBox
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -14
|
||||
Font.Name = 'Tahoma'
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '2.0.6.0'
|
||||
object Panel1: TPanel
|
||||
|
||||
21
about1.pas
21
about1.pas
@ -5,9 +5,12 @@ unit about1;
|
||||
interface
|
||||
|
||||
uses SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
||||
Buttons, ExtCtrls;
|
||||
Buttons, ExtCtrls, fileinfo;
|
||||
|
||||
type
|
||||
|
||||
{ TAboutBox }
|
||||
|
||||
TAboutBox = class(TForm)
|
||||
Panel1: TPanel;
|
||||
ProductName: TLabel;
|
||||
@ -15,6 +18,7 @@ type
|
||||
Copyright: TLabel;
|
||||
Comments: TLabel;
|
||||
OKButton: TButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
@ -28,5 +32,20 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TAboutBox }
|
||||
|
||||
procedure TAboutBox.FormCreate(Sender: TObject);
|
||||
var
|
||||
FileVerInfo: TFileVersionInfo;
|
||||
begin
|
||||
FileVerInfo := TFileVersionInfo.Create(nil);
|
||||
try
|
||||
FileVerInfo.ReadFileInfo;
|
||||
Version.Caption := 'Version ' + FileVerInfo.VersionStrings.Values['FileVersion'];
|
||||
finally
|
||||
FileVerInfo.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user