如何通过单击“x”来检测表单何时关闭。在左上角 [英] How to detect when a form is closed by clicking on the "x" in upper left hand corner
本文介绍了如何通过单击“x”来检测表单何时关闭。在左上角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通过点击"x"关闭表单时在左上角,我不知道如何在我的Visual Basic 2015代码中检测到这个或怎么做,以使我的应用程序能够再次访问该表单而不会得到"无法访问已处置的
对象" ; 。消息 你能帮我解决这个问题吗?
When a form is closed by clicking on the "x" in the upper left corner, I do not know how to detect this or what to do in my code in Visual Basic 2015, to enable my application to access that form again and not get a "cannot access a disposed object" message. Can you help me with this?
推荐答案
我弄清楚了。 我学会了如何使用IsDisposed来检测和修复它。
I figured it out. I learned how to use IsDisposed to detect and fix this.
这篇关于如何通过单击“x”来检测表单何时关闭。在左上角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文