void Form_Click(object sender, EventArgs e)
{
Form2 form = new Form2();
form.Close += delegate { this.Show(); }
form.Show();
this.Hide();
}
------------------
更新:
针对楼下的问题,应该使用Program.Main函数完成这个逻辑,如下:
static Form2 _splashForm;
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Form2 _splashForm = new Form2();
_splashForm.Show();
Application.Run(new Form1());
}
void Form_Show(object sender, EventArgs e)
{
Program._splashForm.Close();
}