按照什么顺序做.NET Windows窗体的事件火? [英] In what order do .NET Windows forms events fire?
问题描述
我注意到有一些不同的事件时,我使用的是Windows窗体的.NET(或任何其他的控制,对于这个问题)我可以捕获 - 在开放,有:
I notice that there are a number of different events I can capture when I'm working with a Windows Form in .NET (or any other control, for that matter) - on opening, there's:
- 加载
- 激活
- 所示
- VisibleChanged在
和关闭的时候,有:
- 将
- FormClosed
- 的FormClosing
- 在处置
以及任何其他我已经错过了。我知道我可以把一个消息在每一个事件,然后运行我的应用程序,并记下了订单,但我怀疑我会记住它。
Plus any others I've missed. I know I could put a messagebox in each event, and then run my application and write down the order, but I doubt I'll remember it.
有没有参考网上,列出的阶 - 的在这些事件发生,窗体和其他控件?我无法找到它在MSDN上,虽然也许我已经错过了它的地方。
Is there a reference online that lists the -order- in which these events occur, for Forms and other controls? I can't find it on MSDN, though maybe I've missed it somewhere.
推荐答案
这是MSDN上的相关网页之一:
This is one of the relevant pages on MSDN :
<一个href="http://msdn.microsoft.com/en-us/library/86faxx0d.aspx">http://msdn.microsoft.com/en-us/library/86faxx0d.aspx
这篇关于按照什么顺序做.NET Windows窗体的事件火?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!