Hi Is there any way to开发者_运维百科 find out if the close button (x button on form) was clicked. However without involving FormClosing and FormClosed events ?
Without those Events? That's a tough one...no, I don't think so.
I mean, you hook yourself into the message pump of the form to figure out if those actions were invoked, but seems like a little overkill to me.
You can use PreProcessMessage to see the message on its' way to your form.
精彩评论