Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a Simple Progress Bar
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00412738
Message ID:
00412958
Vues:
18
>>Thank you very much for the peopole who helped me on the date and string searching including menu problems. Now, I have a another kind of problem, I is been my long desire to create a progress bar. Right now, I am using wait window to display the status like opening. I want to be more realistic in doing it, that is a progress bar. I have browsed on the archived files but it is a class and I can't see the coding on it to maximize my need. Even just a progress bar to count the number of records in a field or any funnction that has a progress bar will. More power to you all!..
>
>First, you need to sub-class the progress bar. You need to maek the progress bar available by clicking on the Options... under the Tools menu pad. Click on the Controls tab. Then click the ActiveX Controls option. Scroll down to the Microsoft Progress Bar Control and make sure it is checked. Click the Set As Default button, then click OK.
>
>Next, you have to create a new class based on a form. In the form designer, you need to switch the Form Controls toolbar to display the ActiveX controls. Click on the library books, then click on ActiveX controls.
>
>Next, drop the Progress Bar control on the form and size it the way you want. In the proerties of the progress control, give it a meaningful name, like oleProgress. I would then click the File, SAVE AS CLASS option as, and save this form with the progress bar as a class.
>
>To use it, do the following:
>
>local oProgress
>oProgress = newobject("ProgressForm", "VCX_Class_Name_Here")
>
>or, in VFP 5 --
>
>local oProgress
>set classlib to VCX_FILE_NAME_HERE
>oProgress = createobject("ProgressForm")
>release classlib VCX_FILE_NAME_HERE && only if necessary
>
>Then --
>
>local oBar
>oBar = oProgress.oleProgress
>oBar.Visible = .t.
>oBar.Value = 0
>oProgress.Show()
>
>Anytime you want to update the value of the progress bar, just issue:
>
>oBar.Value = some_value_between_0_and_100


Mark,

How do you use this Progress Bar for commands like:
COUNT FOR
REPLACE FOR
SUM
INDEX ON
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform