Index: PlanScan/UI/LoginScherm.dfm =================================================================== diff -u -r453 -r634 --- PlanScan/UI/LoginScherm.dfm (.../LoginScherm.dfm) (revision 453) +++ PlanScan/UI/LoginScherm.dfm (.../LoginScherm.dfm) (revision 634) @@ -14,6 +14,7 @@ Font.Style = [] OldCreateOrder = False Position = poScreenCenter + OnShow = FormShow PixelsPerInch = 96 TextHeight = 13 object Image1: TImage @@ -303,6 +304,19 @@ 6C0B21060000B68510030000DB7285D8FF00D013E466C9D4881A000000004945 4E44AE426082} end + object lblVersieNr: TLabel + Left = 616 + Top = 375 + Width = 24 + Height = 16 + Caption = 'v1.0' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -13 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + end object edtLoginCode: TEdit Left = 147 Top = 232 Index: PlanScan/UI/LoginScherm.pas =================================================================== diff -u -r347 -r634 --- PlanScan/UI/LoginScherm.pas (.../LoginScherm.pas) (revision 347) +++ PlanScan/UI/LoginScherm.pas (.../LoginScherm.pas) (revision 634) @@ -13,8 +13,10 @@ edtLoginCode: TEdit; edtInitialen: TEdit; btnLogin: TButton; + lblVersieNr: TLabel; + procedure FormShow(Sender: TObject); private - { Private declarations } + function GeefVersieNummer(): string; public { Public declarations } end; @@ -26,4 +28,17 @@ {$R *.dfm} +procedure TfmLogin.FormShow(Sender: TObject); +begin + lblVersieNr.Caption := 'v' + GeefVersieNummer; +end; + +function TfmLogin.GeefVersieNummer: string; +var + rec: LongRec; +begin + rec := LongRec(GetFileVersion(ParamStr(0))); + result := Format('%d.%d', [rec.Hi, rec.Lo]) +end; + end.