all groups > dotnet compact framework > october 2007 >
You're in the

dotnet compact framework

group:

WM_CLOSE


WM_CLOSE Simon
10/27/2007 3:43:48 PM
dotnet compact framework:
Hi all.

How can i intercept WM_CLOSE message when it were sent from OS (PPC2003) and
not from my application?

Thanks in advance.

Simon.
Re: WM_CLOSE Christian Resma Helle
10/27/2007 7:10:52 PM
Handle the Form.Closing event

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com


[quoted text, click to view]
Re: WM_CLOSE Simon
10/28/2007 2:53:18 PM

[quoted text, click to view]

If i handle this event i cannot know if the closing of the window is
generated by the OS or by my application.

Thanks.

Simon.
Re: WM_CLOSE Ginny Caughey [MVP]
10/28/2007 3:15:23 PM
Simon,

Set some form variable to true if your code closes the form from a menu
option, button click, etc. Then in your closing event handler you can
inspect that variable to see if you caused the closing to happen or not.

--
Ginny Caughey
Device Application Development MVP


[quoted text, click to view]
AddThis Social Bookmark Button