Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get form reference
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00258270
Message ID:
00259038
Views:
20
Hi John,

FOR x = 1 TO _screen.FormCount
If upper(allt(_screen.Forms(x).name)) = "POSFORM"
thisform.StockForm = _screen.Forms(x)
exit
Endif
ENDFOR
If type("thisform.stockFrom")="O"
** Do Something
thisform.stockform.runmethod()
thisform.stockform.setproperty="Hello World"
Endif
Regards,
Fred
>Hi,
> I think I didn't explain my problem in details and cause you misunderstood.
> Like this, I have a top level form as Main windows for my application. When user click on my menu , my menu will call main windows's user defined method (doform()) for DO FORM operation .
> First at all, user click on my menu to call frmA. Then, user might then call other form from my menu (e.g. frmSearch) too.
> Now, there are 2 forms in my main windows. I need to reference frmA's user defined method from frmSearch which frmSearch is active form at that moment. I failed to reference frmA because the DO FORM operation is called in a method and the form name can't be referenced.
> I was told that to has a public variable and use DO FORM frmA NAME var, but it is not flexible if I wat to have more general getformreference function.
>How could I do so?
>
>Thank you
Fred Besterwitch, MCP

The harder you work. The luckier you get.
Previous
Reply
Map
View

Click here to load this message in the networking platform