[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
Add an event handler to your main window and catch the shutdown event look for event type cmd-close / catch event msg-close.
If you catch this, you are in charge and decides whether to call STOP RUN or not.
If you use AcuBench, you get this code created automatically.
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
Add an event handler to your main window and catch the shutdown event look for event type cmd-close / catch event msg-close.
If you catch this, you are in charge and decides whether to call STOP RUN or not.
If you use AcuBench, you get this code created automatically.
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
Add an event handler to your main window and catch the shutdown event look for event type cmd-close / catch event msg-close.
If you catch this, you are in charge and decides whether to call STOP RUN or not.
If you use AcuBench, you get this code created automatically.
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
My first window is an independent window. This is my login program. On pressing login button the login window is destroyed and another program is CALLed to create another independent window. (Note the CALL is made outside of button events e.g. CMD-CLICK).
This 2nd Independent window is now my main application window with menu options and Toolbar push buttons. This then CALLs other programs to display modal floating windows.
1) On shutdown my 2nd independent window does not seem to receive the windows shutdown message. I have got display message box statements in both CMD-CLOSE and MSG-CLOSE events and these are not being displayed. They do when I click the close button "X" on the window.
2) When a modal floating window is active and the user calls for windows shutdown how does this receive shutdown message?
3) How do I distinguise between a shutdown message and close button?
4) If I am unable to use CMD-CLOSE, MSG-CLOSE events because of the way I have designed my application, is there another way of catching Windows Shutdown message?
5) Once I have received shutdown message how do I tell windows not to shutdown because I might not have enough time to close my application before windows completes the shutdown?
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
There were a lot of questions at once here. I suggest we start out with a demo program. Can you make a small program that illustrates your problem with the modal window?
As for the Windows shutdown message and time, Windows allows your app decent time to respond, and if your application is responding timely I cannot see that this should be a matter. Normally Windows will wait for you.
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
Sorry its taken longer to comeback to this...
Attached is a sample project that demostrates my prblem.
Please generate and rebuild the project then run Login program and follow the trail....
Thanks
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
Sorry its taken longer to comeback to this...
Attached is a sample project that demostrates my prblem.
Please generate and rebuild the project then run Login program and follow the trail....
Thanks
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
Sorry its taken longer to comeback to this...
Attached is a sample project that demostrates my prblem.
Please generate and rebuild the project then run Login program and follow the trail....
Thanks
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
There seems to be 8 downloads of a demo project demonstrating my query re: how to catch Windows Shutdown.
Is there any solutions?
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
Have you had a look at the environment variable QUIT-MODE? I would guess it should give you a notification for a system shutdown as it would for just an application shutdown.
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
I have tried QUIT-MODE but does not work with my demo project. According to help QUIT-MODE only works on the "application window". My demo uses Independent window for the Login program (initial program) then that is destroyed before calling my main program which displays the main screen.
I amended my Login program to use initial window but still it does not catch the Windows Shutdown message.
Maybe I am not using it correctly. Can you please look at the demo project and guide me.
Thanks
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
I have tried QUIT-MODE but does not work with my demo project. According to help QUIT-MODE only works on the "application window". My demo uses Independent window for the Login program (initial program) then that is destroyed before calling my main program which displays the main screen.
I amended my Login program to use initial window but still it does not catch the Windows Shutdown message.
Maybe I am not using it correctly. Can you please look at the demo project and guide me.
Thanks
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
I have tried QUIT-MODE but does not work with my demo project. According to help QUIT-MODE only works on the "application window". My demo uses Independent window for the Login program (initial program) then that is destroyed before calling my main program which displays the main screen.
I amended my Login program to use initial window but still it does not catch the Windows Shutdown message.
Maybe I am not using it correctly. Can you please look at the demo project and guide me.
Thanks
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
The only suggestion I have left is to spawn of the subwindows in a thread so that the application window can respond to events and see if you can get the QUIT event then.
If that doesn't work I have no other suggestions.
[Migrated content. Thread originally posted on 01 June 2004]
How do I catch Windows Shutdown while my application is active and possibly minimised?
Once I have caught it how do I then tell windows to abandon shutdown so that the user has the chance to close WRun32 App before shutting down.
Thank you.
Thank you Gisle I shall try that and let you know how I get on.