Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding an object to a form from a called prg in the init
Message
De
10/10/1999 00:05:30
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00274555
Message ID:
00274671
Vues:
29
Very strange. I now see how it works. This is what I tested:

MyForm Init
DO myprog WITH ThisForm

myprog.prg:
LPARAMETER cFormWindowName

WAIT WINDOW "Window: " + cFormWindowName.name
cFormWindowName.caption = "My New Caption"


Here was the problem, I was trying to do this:
EVALUATE(cFormWindowName + ".caption = 'My New Caption'")

I didn't realize that the variable actually becomes the object.




>Pass the form reference as a parameter
>
>>Example:
>
>MyForm Init
> DO PROGRAM showformname WITH ThisForm
>
>
>
>showformname.prg:
> LPARAMETERS poForm
> WAIT WINDOW "Form Name: " + poform.name
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform