private void SetWindowRect(SmallRect sr, bool bAbsolute) { if (disposed) { throw new ObjectDisposedException(this.ToString()); } if (!WinCon.SetConsoleWindowInfo(_handle, bAbsolute, sr)) { int err = Marshal.GetLastWin32Error(); throw new ApplicationException(String.Format("Unable to set window rect: {0}", err)); } }