【发布时间】:2016-06-28 04:34:19
【问题描述】:
当时我得到了这个
更新:感谢所有答案。
private void Form1_Load(object sender, EventArgs e)
{
//hide() doesnt help
Thread init = new Thread(InitApplication);
init.IsBackground = true;
init.Start();
}
InitApplication 至少需要 5 秒以上才能完成并写入所有设置。我希望我的 splashScreen 一直保持到那时。
添加:
private readonly SplashScreen _splash;
public Form1(SplashScreen splashy)
{
_splash = splashy;
InitializeComponent();
}
我得到了
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
SplashScreen splashy = new SplashScreen();
splashy.Show();
Application.DoEvents();
Application.Run(new Form1(splashy));
}
它正在做它应该做的事情,但是,现在我在splashform 的顶部看到了form1。我在哪里可以添加 hide 和 show 方法,以便在完全加载时只显示初始屏幕和 form1 弹出窗口。
【问题讨论】:
标签: c# winforms splash-screen animated-gif