Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Progress bar
Message
From
21/12/1999 11:29:50
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00306626
Message ID:
00306724
Views:
26
>1) Define the appearance you want.
>2) Set the Min value to 1 and the Max value to reccount() or whatever dictates the operations ceiling.
>3) Set the value to 0.
>4) Increment value as you step through your records.
>
>Example:
>
>with ThisForm
>.ProgressBar.Min = 1
>.ProgressBar.Max = reccount("table")
>.ProgressBar.Value = 0
>
>scan
>.ProgressBar.Value = recno()
>
>*!* Other processing.
>endscan
>endwith

Neil, this is a good example of how the ProgressBar control bumps things, but the RECNO()/RECCOUNT() choices aren't too helpful in many cases. RECNO() won't help a bit if the table/cursor you SCAN through has an index on it; the Progress Bar will jump around all over the place, since RECNO() is an absolute reference to the record's physical position in the file. RECCOUNT() as a top limit isn't wonderful either, especially for a filtered result set, where RECCOUNT() returns the total number of records in the base table, not the number of records in the resultset.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform