QueryUnload and the Task Manager 
Author Message
 QueryUnload and the Task Manager

I've got a form used as a modal dialog that has a QueryUnload event used
to validate the data entered by the user.  If the data is not valid,
a MsgBox is displayed and Cancel is set to true.

If I use the Close menu option from the control menu, or unload the form
in the code, the QueryUnload event fires and I see my (optional) MsgBox
telling me some data is not correct on the form.

However, if I run the same program as a standalone-exe and use the Windows'
Task Manager to kill the program, the program just beeps (even though
there is no MsgBeep call in the program) and no MsgBox is displayed, yet
the program stays up (i.e., Cancel is being set to true).

I'm at a loss to understand what is happening here.  Any ideas?

Kevin
--
Kevin W. Hammond



Wed, 27 Aug 1997 00:24:20 GMT  
 QueryUnload and the Task Manager

says:

Quote:

>I've got a form used as a modal dialog that has a QueryUnload event used
>to validate the data entered by the user.  If the data is not valid,
>a MsgBox is displayed and Cancel is set to true.

>If I use the Close menu option from the control menu, or unload the form
>in the code, the QueryUnload event fires and I see my (optional) MsgBox
>telling me some data is not correct on the form.

>However, if I run the same program as a standalone-exe and use the
Windows'
>Task Manager to kill the program, the program just beeps (even though
>there is no MsgBeep call in the program) and no MsgBox is displayed, yet
>the program stays up (i.e., Cancel is being set to true).

I would think TASKMAN is not being so polite as to send a
WM_QUERYENDSESSION but simply gets to the point and sends a WM_ENDSESSION
directly.

So your task doesn't get politely asked if it wants to terminate.

It is{*filter*} around because you don't have an END statement in your
unload event; in VB design mode that doesn't matter but as an .EXE it
certainly does.



Sat, 30 Aug 1997 05:55:49 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how to hide task display on task manager in NT

2. Looking for a Task List manager add-in for the VBA IDE

3. Looking for a Task List manager add-in for the VBA IDE

4. Outlook COM Add In problem: Outlook wouldn't exit from Process in Task Manager

5. Creating a Task with a "Manager"

6. task assignment by different managers

7. Kill application in task manager...

8. How do you close a exe running in task manager

9. Task manager

10. Icon in Task Manager

11. Hiding in the task Manager

12. Hide App from Task Manager in NT/2000

 

 
Powered by phpBB® Forum Software