失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > C#中WinForm窗体事件的执行次序

C#中WinForm窗体事件的执行次序

时间:2020-07-04 20:57:36

相关推荐

C#中WinForm窗体事件的执行次序

C#中WinForm窗体事件的执行次序如下:

当 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

如果觉得《C#中WinForm窗体事件的执行次序》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。