Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Process bar
Message
 
À
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:
00944445
Vues:
14
thanks for the help ravi, i'm going to go with a simple avi as i am not worried about getting the % correct, its really just to show poeple that something is being done during large exports so that they won't start clicking on everything they see. however if i ever redo my little export program, i do it properly the way you suggest:)
Slán
~M

>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.
Go raibh maith agat

~M
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform