Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple Application
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00278192
Message ID:
00278687
Vues:
15
>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform