View Single Post
  #6  
Old 29-04-2014, 06:20
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,749
Thanks: 2,170
Thanked 11,206 Times in 2,307 Posts
Razor12911 is on a distinguished road
You have to make a label, a timer and do some calculations.

for example if using Inno Setup Enhanced Edition

var
Timer: TTimer;
PGPC: TLabel;

procedure PBTimer(Sender: TObject);
begin
if WizardForm.ProgressGauge.Max <> 0 then
PGPC.Caption:= IntToStr((WizardForm.ProgressGauge.Position * 100) div WizardForm.ProgressGauge.Max) + '%';
end;

procedure InitializeWizard;
begin
PGPC:= TLabel.Create(WizardForm);
with PGPC do begin
SetBounds(Left,Top,Width,Height);
Parent:=WizardForm;
end;
Timer:=TTimer.Create(WizardForm);
with Timer do begin
OnTimer:=@PBTimer;
Interval:=500;
Enabled:=True;
end;
end;

Use Curpage to show and hide label.

Last edited by Razor12911; 29-04-2014 at 06:23.
Reply With Quote