private void SetCursorInfo(bool visible, int size) { if (disposed) { throw new ObjectDisposedException(this.ToString()); } ConsoleCursorInfo cci = new ConsoleCursorInfo(visible, size); if (!WinCon.SetConsoleCursorInfo(_handle, cci)) { throw new ApplicationException("Error setting cursor information."); } }
private ConsoleCursorInfo GetCursorInfo() { if (disposed) { throw new ObjectDisposedException(this.ToString()); } ConsoleCursorInfo cci = new ConsoleCursorInfo(); if (!WinCon.GetConsoleCursorInfo(_handle, cci)) { throw new ApplicationException("Error getting cursor information."); } return(cci); }
public static extern bool SetConsoleCursorInfo( IntPtr hConsoleOutput, [In][MarshalAs(UnmanagedType.LPStruct)] ConsoleCursorInfo lpConsoleCursorInfo);