首先当然要定义哪一个启动,我们先新建好一个窗体,比如窗体名字叫Splash

 

然后需要双击项目中的 Program.cs 文件

 

可以见到下面 最后一行即是启动的窗体了:

 

 

static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(
false);
Application.Run(
new Splash());
}

 

 

正好也知道了 Main函数是在 Program.cs 文件 中

 

这样既可启动

 

当然,在Splash的文件中,放一个timer控件,设置好他的Enable属性为true,调整好间隔

 

写出如下代码:

 

private void timer1_Tick(object sender, EventArgs e)
{
Form1 frm1
= new Form1();
frm1.Show();
this.Hide();
this.timer1.Enabled = false;
}

 

相关文章:

  • 2021-08-06
  • 2021-09-29
  • 2021-11-24
  • 2021-09-25
  • 2022-02-14
  • 2022-03-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-21
  • 2021-06-15
  • 2021-05-10
  • 2021-12-17
  • 2021-09-22
相关资源
相似解决方案