Hi
Interesting.
I've thought of a way to do it. Basically, I'm going to create a boolean
which will be set to true if some buttons are pressed otherwise it will be
left as false. I can then check the variable in the OnClose event which will
give the functionality I require.
The reason I am trying this is that I want to re-set some global variables
if, for example, a cancel button is pressed.
Geoff
"AlanT" <al*******@users.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
As far as I know, the .Net framework does not recognise a difference
between the different possible ways of closing a form.
It might not even be possible at a low level to distinguish them - say,
each method just sends a WM_CLOSE message.
However, as Armin indicated, if you could give more information about
why knowing whether the form was closed this way is important, perhaps
someone could suggest another way to achieve your desired result.
hth,
Alan.