在winforms中检测X按钮单击窗口。 [英] Detecting X button click of a window in winforms.

查看:62
本文介绍了在winforms中检测X按钮单击窗口。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检测窗体/窗口控件框右上角的关闭(X)按钮的单击事件?请注意,我不想知道关于CloseReason,FormClosing,FormClosed或类似的东西,除非它们是不可避免的。我确实想检测用户是否单击了表单的X按钮。谢谢。

How can I detect the click event of the close (X) button at the top right corner of the control box of a form/window? Please note, I don't want to know about CloseReason, FormClosing, FormClosed or stuffs like these, unless they are inevitable. I exactly want to detect if the user clicked the X button of the form. Thanks.

推荐答案

检查一下:



如何对知识的用户已经-点击-X-或最关闭按钮 [ ^ ]



希望有帮助:)
check this out:

how-to-know-user-has-clicked-x-or-the-close-button[^]

hope it helps :)


这篇关于在winforms中检测X按钮单击窗口。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆