简单的启动窗体
发布时间:2016-12-29 来源:查字典编辑
摘要:复制代码代码如下:publicstaticSystem.Threading.Threadthread;publicstaticce.Abou...
复制代码 代码如下:publicstaticSystem.Threading.Threadthread;
publicstaticce.Aboutwelcomefrm;
[STAThread]
staticvoidMain()
{
System.Threading.ThreadStartstart=newThreadStart(ce.ceStart.splashForm);
thread=newThread(start);
thread.Start();
//做要做的事
//运行主程序
System.Windows.Forms.Application.Run(newce.Forms.coolmain());
}
staticvoidsplashForm()
{
ce.ceStart.welcomefrm=newAbout();
ce.ceStart.welcomefrm.Show();
Application.DoEvents();
ce.ceStart.welcomefrm.Activate();
thread.Join(2000);
ce.ceStart.welcomefrm.Close();
ce.ceStart.thread.Abort();
}