简单的启动窗体
程序员文章站
2022-07-19 11:42:28
复制代码 代码如下:public static system.threading.thread thread; &nb...
复制代码 代码如下:
public static system.threading.thread thread;
public static ce.about welcomefrm;
[stathread]
static void main()
{
system.threading.threadstart start=new threadstart(ce.cestart.splashform);
thread=new thread(start);
thread.start();
//做要做的事
//运行主程序
system.windows.forms.application.run(new ce.forms.coolmain());
}
static void splashform()
{
ce.cestart.welcomefrm =new about();
ce.cestart.welcomefrm.show();
application.doevents();
ce.cestart.welcomefrm.activate();
thread.join(2000);
ce.cestart.welcomefrm.close();
ce.cestart.thread.abort();
}
public static ce.about welcomefrm;
[stathread]
static void main()
{
system.threading.threadstart start=new threadstart(ce.cestart.splashform);
thread=new thread(start);
thread.start();
//做要做的事
//运行主程序
system.windows.forms.application.run(new ce.forms.coolmain());
}
static void splashform()
{
ce.cestart.welcomefrm =new about();
ce.cestart.welcomefrm.show();
application.doevents();
ce.cestart.welcomefrm.activate();
thread.join(2000);
ce.cestart.welcomefrm.close();
ce.cestart.thread.abort();
}