Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Obeys Windows' Close
Message
 
To
12/02/1997 22:27:50
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00020304
Message ID:
00020403
Views:
46
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform