Uchiha
Fri Sep 16 12:19:16 CDT 2005
Sorry I didn't understand the problem properly before. I've now replicated
it and it's a real interesting one.
However I did some hunting and found this:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=89686
That should do the trick and make up for my previous mis-information I hope.
:)
Jax
"Andreas Zita" <andzi460@student.liu.se> wrote in message
news:%23C7To$tuFHA.4020@TK2MSFTNGP12.phx.gbl...
> Still no solution but this is what I think is happening:
> When I close Form1 from the GUI, OnClosing in FormInfo is never run at all
> (which is a bit odd?). So cancel is never set to true in this case.
> Everything closes fine.
> But when Windows tries to shut down and close my app it apparently begins
> with closing FormInfo and _not_ Form1. Now OnClosing _is_ runned in
FormInfo
> and cancel _is_ set to true. This wouldn't be a problem if Windows would
> continue and try to close Form1 but apparently this is'nt happening. When
> Windows has tried to close FormInfo and finds it was cancelled it aborts
the
> shut down process completely!?
>
> So, how do I know if when FormInfo is Closing, it was initiated by the
user
> or by the OS?
>
> /Andreas Zita (frustrated)
>
>