zl程序教程

您现在的位置是:首页 >  其它

当前栏目

简单的启动窗体

简单 启动 窗体
2023-06-13 09:13:46 时间

复制代码代码如下:

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(); 
  }