Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Progress Bar in a form
Message
 
 
À
12/03/2001 04:50:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00483984
Message ID:
00484034
Vues:
15
>Morning everyone,
>
>I have a FPW form i'm trying to emulate
>The form is called with a couple of parameters (%ge,Message)
>
>The 2.6 form is called multiple times with a new percentage value each time.
>
>But in VFP I am getting lots if instances of the same form.
>
>Anyone know what I have to do to get this working the same way?
>
>I am reluctant to modify the basic functionality of this form as it is called from hundreds of places.
>
>TIA

Will,
The difference you are seeing is the objectification of FoxPro in VFP. SPRs (FPW screens) merely defined a window and wrote things to it using @ SAYs/GETs. When you ran the SPR again with a new parameter, you just overwrote what was previously in that spot on the desktop.

In VFP, forms are objects and completely self-contained. Re-running a form with a new parameter creates a new instance of that form (as you have seen). IMO, you are going to have to re-think the concept. IN VFP terms, you will have to get an object reference to the progress form and call a form-level method to change the label (or whatever) that is showing progress.

You can easily get a reference to the form by looping through the _Screen.Forms collection and checking some attribute of the form you know exists. For example, you could write a function that accepts a parameter, checks the caption property to make sure it corresponds to the passed parameter and return that object if it does. Then you could change any control on that form using the returned object.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform