Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Process bar
Message
From
15/09/2004 11:19:27
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00941827
Message ID:
00942435
Views:
16
I use progress bar in my VFP code a lot. Basically it is class that displays a form with retangular shapes. Within a FOR-ENDFOR, SCAN - ENDSCAN loop, I update the progress bar form. The following code illustrates a typical use
ProgressBar = CreateObject('Progress')   && For Progress Bar

SELECT(SourceWA)				

ProgressBar.MaxCount = RecCount() 									
ProgressBar.ChangeText(1,'Appending ' + AllTrim(Str(RecCount())) + ' records ' 
ProgressBar.Update(1,0)
ProgressBar.Show() 

lnCounter = 0 
SCAN 
    lnCounter = lnCounter + 1
    ProgressBar.Update(1,lnCounter,.T.)  && Update Progressbar		
	
    ** Code to process data ....

ENDSCAN 

ProgressBar.Update(1,100)	&& 100 % done	
** 
ProgressBar.Hide() 
I use the ChangeText() method to display the action being carried out. Initially, the MaxCount property is set to RecCount() to inform the class about the number that corresponds to 100%. Within the SCAN - ENDSCAN loop, Update method updates the progress bar.
- Ravi Taxali
Visual FoxPro Made Simple An excellent book for beginners as well as experienced programmers
Never Forget Again. Setup Email Reminders.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform