In article <vo************@corp.supernews.com>, Nick Marshall
<Nick@Marshall.?.COM.invalid> writes
I could do with something similar - if you find the info please share it
with the group. I will do the same.
I have done some hunting in Google and MS KB without any luck.
I'm not sure of your need, but what I have done will suffice for me at
the moment.
I have changed my "Do you really want to close down this application"
question in the Unload event from a Msgbox to loading a form in Dialog
mode. This form has a Timer Interval of 5 seconds and gives the user
the option to cancel.
After the five seconds, the form closes and the calling form can detect,
via a Global variable, whether a user cancel was requested or not. If
not it allows the unload to continue.
==========
An other method I just thought of, based on a suggestion by Tom van
Stiphout and his comment that forms are closed in the reverse order of
their being opened (I presume that is what he meant with:- the first
hidden form will be last to close).:-
1. Open the master menu
2. Open a hidden form.
3. If the master menu detects a closedown it checks if the hidden form
is still open. If it is then the user has requested a closedown on the
master menu. If it is not then it is a system initiated closedown.
I have two problems though. First, if a user closes the application not
via the master menu but via the Widowns close (X) it will look like a
system closedown. The second is that when I run a test by doing a
log-off with several windows open in my application, it is the master
menu (opened first) that detects the closedown while the other windows
stay open.
--
Les Desser
(The Reply-to address IS correct - hope Swen ignores it))