日期:2014-05-17 浏览次数:21078 次
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
ShowChildForm();
}
public static Form ChildForm;
static void ShowChildForm()
{
if (ChildForm != null && (ChildForm.GetType().Name == "Form1"
------解决方案--------------------
ChildForm.GetType().Name == "Form2"))
{
Application.Run(ChildForm);
ShowChildForm();
}
}
}