Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine the name of the current form?
Message
De
21/01/1999 17:31:31
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00176761
Message ID:
00178767
Vues:
37
>Some code in a class needs to know the name of the form that has instantiated it. Is there a way to determine it? Something like thisform.name? I need the name of the .scx or .sct file.
>
>Thanks.

You need an object reference to the form that youare looking up the file for. If the object was instanciated with THISFORM.AddObject('myObject','myClass') then you can use THIS.PARENT otherwise, you might need to pass in the form as a parameter:

o = CREATEOBJECT('MyClass',THIS)

Once you have an object reference, you can find the scx or vcx using:

lcFile = SYS(1271, oForm)
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform