我想在我的 C# 桌面应用程序中删除或阻止异常。当我的项目加载其启动画面时发生此问题..
启动画面调用的代码是
private void SplashForm()
{
Splash newSplashForm = new Splash();
newSplashForm.ShowDialog();
newSplashForm.Dispose();
}
和
public MainForm(string filearg) {
Thread t1 = new Thread(new ThreadStart(SplashForm));
t1.Start();
Thread.Sleep(TimeSpan.FromSeconds(5)); // The amount of time we want our splash form visible
t1.Abort();
Thread.Sleep(7000);
}
我怎样才能删除这个异常