加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

vb.net – FormClosed和FormClosing事件之间的区别

发布时间:2020-12-17 00:07:40 所属栏目:大数据 来源:网络整理
导读:在VB.NET中,FormClosed和FormClosing事件有什么区别? Private Sub frmTerminal_TCP_FormClosing(sender As Object,e As FormClosingEventArgs) Handles MyBase.FormClosingEnd SubPrivate Sub frmTerminal_TCP_FormClosed(ByVal sender As Object,ByVal e A
在VB.NET中,FormClosed和FormClosing事件有什么区别?
Private Sub frmTerminal_TCP_FormClosing(sender As Object,e As FormClosingEventArgs) Handles MyBase.FormClosing

End Sub


Private Sub frmTerminal_TCP_FormClosed(ByVal sender As Object,ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

End Sub
FormClosing发生在FormClosed之前.想想FormClosing,就像要求您在退出程序之前保存文档的对话框一样.它让您有机会取消窗口的终止.

表单关闭后触发FormClosed.从MS documentation开始:

The FormClosed event occurs after the form has been closed by the user or by the Close method or the Exit method of the Application class. To prevent a form from closing,handle the FormClosing event and set the Cancel property of the CancelEventArgs passed to your event handler to true.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读