我遇到了问题,我添加了一个启动画面。出现闪屏。但它完成后并没有消失,主表格已经加载。
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Thread thread = new Thread(new ThreadStart(showSplashScreen));
thread.IsBackground = true;
thread.Start();
Thread.Sleep(1000);
Main main = new Main();
Application.Run(main);
thread.Abort();
}
private static void showSplashScreen()
{
Application.Run(new SplashForm());
}