How to know user has clicked "X" or the "Close" button?

Posted by BDotA on Stack Overflow See other posts from Stack Overflow or by BDotA
Published on 2010-04-21T14:15:44Z Indexed on 2010/04/21 14:23 UTC
Read the original article Hit count: 227

Filed under:

in MSDN I found CloseReason.UserCloseing to know that the user had decided to close the form but I guess it is the same for both clicking the X button or clicking the close button. so How can I differentiate between these two in my code?

Thanks all.

© Stack Overflow or respective owner

Related posts about c#