我应如何执行code后一种形式加载? [英] How do I execute code AFTER a form has loaded?
本文介绍了我应如何执行code后一种形式加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在.NET,Windows窗体有一个表格前大火被加载(Form.Load)的事件,但有是发射后的形式已加载没有对应的事件。我想执行一些逻辑形式加载之后。
In .NET, Windows Forms have an event that fires before the Form is loaded (Form.Load), but there is no corresponding event that is fired AFTER the form has loaded. I would like to execute some logic after the form has loaded.
任何人都可以提出建议的解决方案?
Can anyone advise on a solution?
推荐答案
您可以使用中显示事件:的 MSDN - Form.Shown
You could use the "Shown" event: MSDN - Form.Shown
所显示的事件只提出的第一个时间显示一种形式;然后最小化,最大化,恢复,隐藏,显示或无效,并重新油漆会不会引发此事件
"The Shown event is only raised the first time a form is displayed; subsequently minimizing, maximizing, restoring, hiding, showing, or invalidating and repainting will not raise this event."
这篇关于我应如何执行code后一种形式加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文