Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Q: Convert an object pointer into a string expression?
Message
 
À
27/11/1998 07:47:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00161920
Message ID:
00161926
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform