Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Process bar
Message
De
15/09/2004 11:19:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00941827
Message ID:
00942435
Vues:
17
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform