Winform 窗体隐藏运行

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;
}

你可能感兴趣的:(object,WinForm)