//Application 类 提供 static 方法和属性以管理应用程序,
//例如启动和停止应用程序、处理 Windows 消息的方法和获取应用程序信息的属性。此类不能被继承。
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form1 from1 = new Form1();
//这个Controls.Find(....)试了好久才成功,所以记下!!
((Label )from1.Controls.Find("label1", true)[0]).Text = "[CLIENT] Wait for sync...";
Application.Run(from1);
Find()一定要放在Application.Run()前面。
如果放在后面,这个是必然的:Index was outside the bounds of the array.