表单onLoad事件未在C#Visual Studio 2010上触发 [英] Form onLoad event not being fired on C# Visual Studio 2010
本文介绍了表单onLoad事件未在C#Visual Studio 2010上触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在VS 2010中开发基于WinForms C#的应用程序,突然有几种形式都没有触发onLoad事件。
I am developing a WinForms C# based application in VS 2010, all in a sudden several forms were not firing the onLoad event.
我不知道出了什么问题,上次我检查表格是否完美,我几周没有改变任何东西。
I have no idea what can be wrong, last time I checked the forms were working perfectly and I haven't changed anything in weeks.
非常感谢任何建议
推荐答案
在Form.Designer中的InitializeComponent方法中订阅Load evenent .cs
Make shure that you have subscribe on Load evenent in InitializeComponent method in Form.Designer.cs
this.Load += new System.EventHandler(this.Form1_Load);
你也可以在VS GUI中双击事件列表中的加载:
also you can do it from VS GUI just double click on Load in event list:
这篇关于表单onLoad事件未在C#Visual Studio 2010上触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文