This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Progress Bar
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 30, 2008
03:57 AM
Progress Bar
HI.
Is it possible to set progress bar size larger than MAX_INT and how?
thanks
Is it possible to set progress bar size larger than MAX_INT and how?
thanks
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 30, 2008
09:42 AM
You could try this idea. Set the bountries to be 0 to 100. Then use this:
So the nIndex should be where you are in whatever you are doing and the nSize should be the Total size of whatever you are doing. So nPosition is where you are between 0 to 100.
Now, keep in mind, the datatype NUMBER doesn't store floating point numbers. So it will automatically round down to the nearest integer.
VERY IMPORTANT: You must multiply the index by 100 first before you divide it by your size. You see, Install Shield doesn't do floating point calculations. If you don't believe me, try this.
NUMBER nPosition;
NUMBER nIndex;
NUMBER nSize;
Begin
nPostion = ((nIndex * 100) / nSize);
End;
So the nIndex should be where you are in whatever you are doing and the nSize should be the Total size of whatever you are doing. So nPosition is where you are between 0 to 100.
Now, keep in mind, the datatype NUMBER doesn't store floating point numbers. So it will automatically round down to the nearest integer.
VERY IMPORTANT: You must multiply the index by 100 first before you divide it by your size. You see, Install Shield doesn't do floating point calculations. If you don't believe me, try this.
STRING strMsg;
Begin
nPostion = ((nIndex / nSize) * 100);
Sprintf(strMsg, "%d", nPostion);
MessageBox(strMsg, INFORMATION);
nPostion = ((nIndex * 100) / nSize);
Sprintf(strMsg, "%d", nPostion);
MessageBox(strMsg, INFORMATION);