>I'm writing what should be a very simple app and I want the form to be the application, but I don't want the Visual Foxpro Window or menu.
>
>So in the init event of the form
> Application.Visible = .F.
>
>and in destroy
> Application.Visible = .t.
>
>In the VFP environment the VFP window remains, but the form at least works, but when I compile it to an EXE the app loads then disappears without any interaction. Any ideas?
(1) The form must be modal.
(2) If you don't want any sign of the VFP main Window, you need to compile in a CONFIG.FPW that includes SCREEN = OFF in it. Your form now must be modal, and must act as a Top-Level form. All children should be fired to Display in Top-Level Form.
I've encountered a bug in VFP6 trying to do this - if I try to use a modal, Top-Level form as my main, it does not appear to be self-sustaining when compiled. To work around this, a minimal MAIN.PRG that simply launches the Top-Level modal form and quits when control is returned from the modal form, something like:
DO FORM MyTopLevelForm
QUIT
Doing this eliminates the need for the VFP main window at all, and the adjustments to Application.Visible, but be warned that some native VFP screens like the Report Preview require the VFP main window to be active and visible, and won't appear if Application.Visible (or _SCREEN.Visible, the equivalent) is false, which can be rather disconcerting.
Good luck.