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
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