Hi Macer,
I've tested your code and what I see is, that as soon as the modal "in top level" is displayed, most actions are blocked in VFP's main window, regardless whether the browser window is diplayed or not. At least the menu and toolbars are deactivated. Seems as if the modal form is modal to VFP and not to it's visual parent window ... I tried setting MDIChild=.T. and Desktop = .t., but both didn't help in any way. Sorry, I can't think of anything more, but I thought I'll let you know what I experienced.
Regards,
Armin
>Hi,
>
>I have a problem with a modal window that is created in a top level form. The problem is that if the user switches back to the main app window after launching a modal window in a top level form it is not always possible to switch back to the modal window.
>
>The code below demonstrates the problem. When run as is everyting is fine. However, if the line 'DO (_browser)' is uncommented and run again, it is no longer possible to switch between the main app window and back again. Is there any way to have a modal window in my top level form... that isn't modal.
>
>The Do (_browser) is only for demo purposes, the same problem can be observed, if any form is displayed in the main app window.
>
>Thanks for any help
>
>Mace
>
>
>
>LOCAL loTopWindow AS myTopForm OF WindowTest.prg
>LOCAL loTopModalWindow AS myTopModalForm OF WindowTest.prg
>
>*DO (_browser)
>
>loTopWindow = NEWOBJECT( 'myTopForm', 'WindowTest.prg')
>loTopWindow.Show()
>
>loTopModalWindow = NEWOBJECT( 'myTopModalForm', 'WindowTest.prg')
>loTopModalWindow.Show()
>
>*-------------- Class defs
>DEFINE CLASS myTopForm AS Form
>
>*-- Top Level
>ShowWindow = 2
>
>ENDDEFINE
>
>
>DEFINE CLASS myTopModalForm AS Form
>
>*-- In Top Level
>ShowWindow = 1
>
>*-- Modal
>WindowType = 1
>
>ENDDEFINE