Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing THISFORM from a .PRG file
Message
De
11/02/2000 18:00:52
 
 
À
11/02/2000 16:29:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00331088
Message ID:
00331165
Vues:
19
>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

Best would be to pass an object reference to the call:

*...in method code
abcd=MyProcUDF(thisform,...other parms)
*
*
FUNCTION MyProcUDF
LPARAMETER toFormRef, ...yadda, yadda, yadda
IF toFormRef.OfferCredit
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform