Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error message in cprogres.vcx
Message
From
02/04/1998 11:54:09
 
 
To
02/04/1998 11:52:10
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00088979
Message ID:
00088980
Views:
23
>In the SetValue() method you have:
>
>lnPercent = Int(tnValue/this.nMax * 100)
>lnWidth = Int(lnPercent/100 * this.Width) - 2
>this.shpBar.Width = lnWidth
>
>If you instantiate the progress bar with nMin=1 and nMax=149 (for the number of records in a table), there will be an error message 'The width property evaluated to an illegal number'. The thing is:
>
>lnPercent = Int(1/149*100) = 0
>lnWidth = Int(0/100*0) - 2 = -2
>
>Maybe someone else already pointed this out. Or am I misinterpreting the use of nMin and nMax? In this example, I need to instantiate with nMin=1 and nMax=100 and process the Value passed outside the class.

Message intended for Michael G. Emmons.

Post about cprogres.vcx in Files->Classes here.
Previous
Reply
Map
View

Click here to load this message in the networking platform