Quote:
Originally Posted by mht1526
How to fix this? it Shows 0 minutes & 0 Seconds Remaining..
|
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;
var
Remaining: Integer;
begin
if OveralPct<=Wizardform.ProgressGauge.Max then
Wizardform.Progressgauge.Position := OveralPct;
Result := ISDoneCancel;
with WizardForm.ProgressGauge do begin
if (Position>0)and((GetTickCount-StartInstall)/1000>0) then
Remaining:= ((Max-Position)/(Position/((GetTickCount-StartInstall)/1000)))*1000;
WizardForm.Caption:=(IntToStr(ProgressPercent)+'%' )+(' Wait ' + TicksToTime(Remaining, cm('hour'), cm('min'), cm('sec'), false));
end;
end;