Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Obeys Windows' Close
Message
 
À
12/02/1997 22:27:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00020304
Message ID:
00020403
Vues:
42
>Exe files I create will not allow themselves to be
>shut down when windows is by a user;
>they give a "Cannot shut down VFP" message.
>
>is there a switch I can flip to make them complient?

Yes, as Glenn pointed out, you need to have the ON SHUTDOWN event execute code that would terminate VFP. My SHUTDOWN does the following

ON SHUTDOWN && VERY NECESSARY!!
ask=messagebox("Quit?", 4+32, "Question")
DO CASE
DO CASE
CASE nAnswer = 6
CLEAR EVENTS
CASE nAnswer = 7
on shutdown do proc.prg && Turn event "back on"
*proc.prg is this code. The above line should be
*in your startup code
ENDCASE

If you don't want to question whether or not to quit, just put
ON SHUTDOWN
CLEAR EVENTS

and that should take care of it!

Steve.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform