View Single Post
  #7  
Old 29-04-2014, 07:28
aj12345 aj12345 is offline
Registered User
 
Join Date: Oct 2013
Location: bih
Posts: 29
Thanks: 46
Thanked 3 Times in 3 Posts
aj12345 is on a distinguished road
Quote:
Originally Posted by Razor12911 View Post
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.
I use inno setup ultra.
This is my script https://www.mediafire.com/?bz8so92s0i6bioy.
Can yu insert percent I do not know.

Last edited by aj12345; 29-04-2014 at 13:51.
Reply With Quote