Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call 1 form from another
Message
From
27/01/1999 19:51:40
 
 
To
27/01/1999 09:16:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00180717
Message ID:
00181122
Views:
12
>I have this main form with the foll properties(some)
>MODELESS
>AS TOP LEVEL FORM
>
>I call this from a .prg file
>
>DO FORM main
>READ EVENTS
>
>This runs OK as an EXE with a config.fpw line
>SCREEN=OFF
>
>On this form I have a command button that must launch another form, hiding the main form. This form - Form2, is now the top level form.
>MODAL
>AS TOP LEVEL FORM
>
>
>In the click of the button:
>retval = .F.
>DO FORM form2 TO retval
>

Bernard,

As others have already said, only one form can be top level. But why do you need to return the value? Just initialize the variable before calling the form (as you are) then set the value you want for it inside the form. The value can then be used however you want to after the form is released.

I use: DO FORM form2 NAME form2 linked

for a modal form and then release the form2 variable from the QUIT button of the form. Of course you can set the TerminateRead property which automatically closes the form when the button is clicked.
Previous
Reply
Map
View

Click here to load this message in the networking platform