Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Q: Convert an object pointer into a string expression?
Message
 
To
27/11/1998 07:47:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00161920
Message ID:
00161926
Views:
14
>Hi all,
>
>Is there a way to convert an object pointer into a string expression? I have a variable oMyForm, pointing to a specific screen form. For example:
>
>oMyForm = _screen.forms(2)
>
>Now I need to convert this oFormName into a character string, say cMyForm, which is expected to contain a value like "_screen.forms(2)", how should I do that?
>
>Thanks in advance.
>
>Best regards,
>Abe

You could use something like:
FOR n =1 to _screen.formcount
    IF oMyForm.Name  ==  _screen.forms(n).Name
          cMyForm = "_screen.forms(" + alltrim(str(n)) + ")"
    ENDIF
ENDFOR
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform