Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine the name of the current form?
Message
From
21/01/1999 17:31:31
 
 
To
15/01/1999 17:48:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00176761
Message ID:
00178767
Views:
36
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform