Hi
The bar is proportionally to the percentage because the variable lnPercent is a fraction from 0 to 1.
For Example: ShowProgress("Printing...",RecNo()/RecCount())
The 100% is at the final end of the bar to you can see the bar move from o to 100%.
Thanks
Simon
>>Just for interest I created the following simple progress bar. I use it in my applications because I wanted something that was fast. I have used objects with Colored shapes that increase in size etc. but this is simple and available
>>to all my objects.
>
>>
>>#Define DC_PROGRESSBARLENGTH 75
>>
>>Procedure ShowProgress
>>LParameter lcMsgTxt,;
>> lnPercent
>>
>>Local lnCurrentBarLen
>>lnCurrentBarLen=Int(DC_PROGRESSBARLENGTH*Min(1,lnPercent))
>>
>>Set Message To " Progress:"+Replicate(DC_PROGRESSBARCHARACTER,lnCurrentBarLen)+;
>>Replicate(" ",DC_PROGRESSBARLENGTH-lnCurrentBarLen)+"100% "+lcMsgTxt
>>Return
>>
>
>Hello, Simon.
>
>The concept is interesting, but I don't understand why you're always showing 100% at the end. Also, you are not making the percentage proportional with the bar length.
>
>Something I did in my progress bars that facilitates it's use, too, is to pass the function the current position and the total, then I calculate the lenght of the bar. Having to pass the percentage already calculated foces you to do it in every place where you are calling the component.
>
>Good luck.
Simon White
dCipher Computing