public static void RestoreWindow(IntPtr handle) { if (handle != IntPtr.Zero) { User32Interop.ShowWindow(handle.ToInt32(), ShowWindowFlags.SW_RESTORE); } }