Windows窗体中的事件顺序“Form.Load”,“Form.Swn”和“Form.Activated” [英] Order of events 'Form.Load', 'Form.Shown' and 'Form.Activated' in Windows Forms

查看:262
本文介绍了Windows窗体中的事件顺序“Form.Load”,“Form.Swn”和“Form.Activated”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

表单之间的区别是什么?加载 Form.Swnwn Form.Activated 事件?

推荐答案

此外, Form.Activate 事件可以被多次触发。例如,如果您从表单中打开一个消息框,并且当您单击消息框的任何按钮并返回到表单时,将触发 Form.Activate 。任何其他对话框也是如此,例如 FileOpenDialog

Moreover, Form.Activate event can be fired multiple times. For example, if you open a message box from your form, and when you click on the messagebox's any button, and return back to the form, Form.Activate is fired. The same is true for any other dialog box such as FileOpenDialog.

这篇关于Windows窗体中的事件顺序“Form.Load”,“Form.Swn”和“Form.Activated”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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