Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-08-2016, 21:49
buttignol's Avatar
buttignol buttignol is offline
Registered User
 
Join Date: Sep 2012
Location: Brasil
Posts: 126
Thanks: 102
Thanked 16 Times in 13 Posts
buttignol is on a distinguished road
Help function ProgressPercent

Help function ProgressPercent

I'm trying to use function ProgressPercent

But it works only > LabelPct.Caption: = IntToStr (ProgressPercent) + '%';

I wanted to add + chr (48 + OveralPct mod 10) + '%' '.';

failing to add is not correct (Example: stay like 45.4%)

Can anyone help

Quote:
function ProgressPercent:Integer;
var
pr,i1,i2: Extended;
begin
if (ISDoneProgressBar.Position>ISDoneProgressBar.Min) then begin
i1:=ISDoneProgressBar.Position-ISDoneProgressBar.Min;
i2:=ISDoneProgressBar.Max-ISDoneProgressBar.Min;
pr:=i1*100/i2;
Result:=Round(100*pr/100);;
end;
end;

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;
begin
if OveralPct<=ISDoneProgressBar.Max then
ISDoneProgressBar.Position := OveralPct;

LabelPct.Caption := IntToStr(ProgressPercent)+'.'+chr(48 + OveralPct mod 10)+'%';
LabelCurrFileName.Caption := MinimizePathName(ExpandConstant('{app}\')+CurrentF ile, LabelCurrFileName.Font, LabelCurrFileName.Width);
LabelTime1.Caption := ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption := ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
LabelTime3.Caption := ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;
Thank you
Reply With Quote
Sponsored Links
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blackbox Inno Setup Script Kurutucu Conversion Tutorials 1190 18-08-2019 22:43
Useful Dll for Inno Setup users peterf1999 Conversion Tutorials 88 01-12-2017 16:00
Cant get inno setup to decompress archive during installation! surumanboy PC Games 16 29-05-2013 00:26
Progress bar for Tasks danswano PC Games - CD/DVD Conversions 22 09-03-2013 12:09



All times are GMT -7. The time now is 13:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com