Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing THISFORM from a .PRG file
Message
De
11/02/2000 16:56:16
 
 
À
11/02/2000 16:53:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00331088
Message ID:
00331109
Vues:
17
>>>>I have a function "ConvMacros" in my procedure library. This function used to be a form method, but now I need to use it from multiple forms so I've moved it into my ProcLib.prg file.
>>>>
>>>>How can I reference a property of the active form?
>>>>
>>>>I.E.
>>>>
>>>>
>>>>IF THISFORM.OfferCredit
>>>>  * do something
>>>>ELSE
>>>>  * do something else
>>>>ENDIF
>>>>
>>>>
>>>>TIA
>>>
>>>IF _SCREEN.ActiveForm.OfferCredit
>>
>>This is the approach I used, but I'm thinking that George's may be more stable for the reason's he mentioned.
>>
>>Still, Thanks a Ton !
>
>George is correct, that you may have issues with ActiveX, etc and ActiveForm. Passing the form object as a parameter is the "safest" way. (But I've not run into any of the problems with ActiveForm, yet, anyways).

This particular form has two ActiveX controls on it (MSMultiMedia and DynaZip) and their both working flawlessly, so I don't want to introduce anything that may compromise that.

Thanks again
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform