Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lost object name
Message
 
 
To
05/02/1999 12:41:37
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00184432
Message ID:
00184456
Views:
19
Mark,

The NAME FRMENTRY creates a memvar named FRMENTRY, it holds a reference to the form object. Your form's .Name property is set to ENTRY you can make it whatever you want from the property sheet. The form object has no idea what memvar points to it, so there is no way knows about FRMENTRY unless you scan the memvars looking for object references.

You need to simply scan the _screen.Forms[] collection to find the form:
for i = 1 to _screen.FormCount
   ? _screen.Forms[i].Name
endfor
>When I execute the statement:
>DO FORM ENTRY NAME FRMENTRY
>
>and then later try to set a variable to the active form's name:
>lcActiveForm = _screen.activeform.name
>
>lcActiveForm = 'ENTRY' instead of 'FRMENTRY' !!!!
>
>ENTRY is not an object, FRMENTRY is though.
>
>I need a function that returns 'FRMENTRY' instead so I can execute a statement like the one below that addresses the form object:
>
>&lcActiveform..showtips = .T.
>
>If the form is active I can do:
>_screen.activeform.showtips = .T.
>
>but I am storing the form objects name in charactor field in a table and need to be able to reference it without the form being the active form.
>
>Any ideas?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform