Winform 窗体隐藏运行

来源:互联网 发布:大道行知 编辑:程序博客网 时间:2024/05/05 04:42

public Form1()
{
    InitializeComponent();

    this.ShowInTaskbar = false;
    this.WindowState = FormWindowState.Minimized;
}

private void Form1_Shown(object sender, EventArgs e)
{
    this.Hide();
    this.WindowState = FormWindowState.Normal;
    this.ShowInTaskbar = true;
}

原创粉丝点击