/// <summary> /// 设置窗口显示状态 /// </summary> /// <param name="lpWindowName">窗口标题</param> /// <param name="nCmdShow">显示指令</param> public static void ShowWindow(string lpWindowName, int nCmdShow) { IntPtr hWnd = UnsafeNativeMethods.FindWindow(null, lpWindowName); if (hWnd == IntPtr.Zero) { return; } UnsafeNativeMethods.ShowWindow(hWnd, nCmdShow); }