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.
 
Back
Top