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.Color = clWindowText
|
||||||
Font.Height = -14
|
Font.Height = -14
|
||||||
Font.Name = 'Tahoma'
|
Font.Name = 'Tahoma'
|
||||||
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '2.0.6.0'
|
LCLVersion = '2.0.6.0'
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
|
|||||||
21
about1.pas
21
about1.pas
@ -5,9 +5,12 @@ unit about1;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
uses SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
||||||
Buttons, ExtCtrls;
|
Buttons, ExtCtrls, fileinfo;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
{ TAboutBox }
|
||||||
|
|
||||||
TAboutBox = class(TForm)
|
TAboutBox = class(TForm)
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
ProductName: TLabel;
|
ProductName: TLabel;
|
||||||
@ -15,6 +18,7 @@ type
|
|||||||
Copyright: TLabel;
|
Copyright: TLabel;
|
||||||
Comments: TLabel;
|
Comments: TLabel;
|
||||||
OKButton: TButton;
|
OKButton: TButton;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
@ -28,5 +32,20 @@ implementation
|
|||||||
|
|
||||||
{$R *.lfm}
|
{$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.
|
end.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user