Stopping a child window from closing

  • Thread starter Thread starter JH
  • Start date Start date
J

JH

When the user tries to close a child window, I want to use
the Closing event to hide the window instead and cancel
the close. How can I cancel the window from closing?

Thanks.
 
CancelEventArgs e.Cancel = true on the Closing event handler

OR

Override WndProc and catch WM_SYSCOMAMND and SC_CLOSE.


MS sure flucked up this one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top