[英]c# Maximize, Minimize and Close buttons on form
Hi Is there any way to find out if the close button (x button on form) was clicked. 嗨,有什么方法可以找出是否单击了关闭按钮(窗体上的x按钮)。 However without involving FormClosing and FormClosed events ? 但是不涉及FormClosing和FormClosed事件吗?
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. 我的意思是,您将自己吸引到表单的消息泵中以弄清楚是否调用了这些操作,但对我来说似乎有点过大了。
您可以使用PreProcessMessage来查看表单中的消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.