Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug with beautify
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00542537
Message ID:
00546517
Views:
29
>The way your code is written, the progress bar is not going to get to 100% unless your data just happens to contain an even multiple of 100 records. Run the following code to demonstrate
>ox = createobject("progbar")
>ox.show()
>
>*	Demonstrate that 100% shows correctly.
>ox.SetRange( 0, 10000)
>ox.SetPos( 10000)
>wait window "Progress bar shows 100%"
>
>*	This will never reach 100%
>ox.Reset()
>lnReccount = 9999	&& Or any number between 9901 and 9999
>ox.SetRange( 0, lnReccount)	
>ox.SetPos( 0)
>FOR lni = 1 to lnReccount
>   if mod( lni, 100) = 0
>   	ox.SetPos( lni)
>   endif
>ENDFOR &&* lni = 1 to 10000
>wait window "Progress bar shows 99%"
>
>ox = null
>release ox
Thanks, Rick. I solved this problem already by adding oProgBar.SetPos(m.lnReccount) right after the loop.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform