General information
Category:
Forms & Form designer
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only