>VFP 5.0.
>Question about form reference in run-time. I have
>a file FORM1.SCX with a form,named MYFORM. When I try
>to manipulate with a form at run-time, such as -
>? myform.caption
>or
>? _screen.myform.caption
>I got a message,that such member (MYFORM) isn't found.
>I've tried DO FORM form1 NAME myform , but the result
>is the same :( What's wrong ?
>
>Sergey
>reware@cafe.redcom.ru
Sergy,
If it's not a formset your using, look at the linked clause of DO FORM in help. If you create an object reference variable thne use it in the name clause with linked, then you can access the form's methods and properties anytime, anywhere.
It saves me alot of headache...
In main:
public oMyForm
then:
do form myform name oMyForm linked
then anytime while form is instanciated:
if type(oMyForm) = 'O'
? oMyForm.caption
? oMyForm.WhatEver()
endi
HTH
Eric K.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement