Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding an object to a form from a called prg in the init
Message
From
10/10/1999 00:05:30
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00274555
Message ID:
00274671
Views:
28
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
Previous
Reply
Map
View

Click here to load this message in the networking platform