[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr hwnd, int nCmdShow);
[DllImport("user32.dll")]
static extern IntPtr GetForegroundWindow();
const int Min = 2;
const int Max = 3;
const int Normal = 1;
然后在start函数里调用
ShowWindow(GetForegroundWindow(), Min);
他会一运行就最小化
记得引用命名空间