C# windows form如何隐藏窗口?

you can use this line of code. It wont hide it, but it will be minimized:

this.WindowState = FormWindowState.Minimized;

in addition, if you don't want it showing on the task bar either, you can add this line:

this.ShowInTaskbar = false;

But why do you create the form if you don't want it to be visible in the first place?

原文地址:https://www.cnblogs.com/time-is-life/p/6042849.html