Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameters for INIT and LOAD
Message
De
06/08/2008 15:02:42
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
06/08/2008 14:07:37
Brooks Adair
Edgemed Healthcare Solutions
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01336522
Message ID:
01337012
Vues:
20
>>So, until a third solution is presented, we have:
>>
>>- tap the _screen.ActiveForm, assuming that that's the form which called, and that its properties hold the parameter (which is not necessarily so but can be arranged)
>>- rework the form so that the parameter isn't needed during the instantiation, but can be passed to a method later.
>
>The project I am working on is using Visual MaxFrame(VMP). VMP has a standard global object called oForms that has a method DoForm() which is used to call all forms. DoForm() is passed both the form name and the parameters to the new form. I had a need for parameters in Load() so I added a method to get the parameter from oForms. I changed the Load() method on my base form to get the parameter from oForms and make it available as a property. So, all my forms automatically have access the the parameter in Load().
>
>Generally I pass a single parameter object to forms. I can call AddProperty() and add as many parameters to it I want.
>
>This implementation let me do something else. oForms.DoForm() if called with a form name that was already running activated the existing form. So in Activate() I could check to see if oForms passed any new parameters. So if a user clicks on a button that is supposed to launch a form and start it on a specific record, it still works if the form is already running.
>
>A bit more work to setup, but it has worked for me nicely.

Now this is a clean implementation. Not out-of-the-box, plain vanilla VFP, this is homework done. Neat :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform