Winform启动时隐藏不显示
时间:2022-03-18 10:35
我最终用了这个方法:
1.MainForm的构造方法中添加:
public MainForm() { InitializeComponent(); this.ShowInTaskbar = false; this.Opacity = 0; }
2.MainForm的Shown事件中添加:
private void MainForm_Shown(object sender, EventArgs e) { this.Hide(); this.ShowInTaskbar = true; this.Opacity = 1; }