我想以隐藏模式启动应用程序,并在5秒钟后显示表单。为什么这段代码没有隐藏主窗口?
public MainWindow() : base(Gtk.WindowType.Toplevel)
{
Build();
this.Decorated = false;
this.Modal = true;
this.KeepAbove = true;
Hide();
GLib.Timeout.Add(5000, new GLib.TimeoutHandler(ShowForm));
}
bool ShowForm()
{
this.ShowAll();
label1.Text = DateTime.Now.ToString();
return true;
}