Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use progress bar
Message
De
18/12/2003 11:31:14
 
 
À
18/12/2003 10:16:59
Suhas Hegde
Dental Surgeon
Sirsi, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00860254
Message ID:
00860379
Vues:
19
>>>i want to increment the progressbar when there is excution of each line of code.time required for execution of the line is not important. how to use lineno(),and or do i have to use pass values to progressbar.value after each line execution or is there any other simpler method?
>>
>>The progress bar max needs to be established before before growing the value. The value must be explicity assessed before/after a line of code or inside a loop.
>>
>>For example, if you're loading cursors, and you have 10 select statements. set the max to 10, and then, before each select, add 1 to the bars value.
>
>hello Terry,
>thank u for ur reply.
>
>i have right now incremented the value after each line of code but thats causing real pain in my fingers. with a lot of lines i thought if there was any simple way to do it?
>
>suhashegde

A Progress bar is normally used in a loop where you are processing repetitive tasks that may take some time to complete where you know the total number of tasks to be performed, and the progress bar's current position value is updated with each pass through the loop. In this way while the progress bar is updated numerous times its update call is is placed in code only once within the loop. Ideally, for the progress bar to be really meaningful in estimating the time to completion, each incremental task should take approximately the same amount of time, so that if the progress is at 50% and it has taken 2 minutes to get to this point, the user may reasonably expect it to take another 2 minutes to complete. If the tasks being indicated by the progress bar do not have any similarity in scope or time to complete, a changing message in the status bar or a changing message in a wait window or on screen may be more suitable to indicate to the user that your application is doing something and is not locked up. To me there are few things more irritating than a progress bar that gets to 98% in 2 seconds and takes an hour to finish whatever it is doing. That makes me wonder if the program is hung, where an appropriate message might tell me that the ongoing process just takes more time than the previous tasks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform