您的位置:首页 > 编程语言 > C#

C#打开关闭窗体事件顺序

2009-01-29 13:05 555 查看
应用程序启动与关闭事件 Form 和 Control 类和应用程序启动与关闭有关的时间。

当 Windows Form 应用程序启动时,会以下列顺序引发主要表单的启动事件:
System.Windows.Forms.Control.HandleCreated
System.Windows.Forms.Control.BindingContextChanged
System.Windows.Forms.Form.Load
System.Windows.Forms.Control.VisibleChanged
System.Windows.Forms.Form.Activated
System.Windows.Forms.Form.Shown

当应用程序关闭时,会以下列顺序引发主要表单的关闭事件:
System.Windows.Forms.Form.Closing
System.Windows.Forms.Form.FormClosing
System.Windows.Forms.Form.Closed
System.Windows.Forms.Form.FormClosed
System.Windows.Forms.Form.Deactivate
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: