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);
        }
        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.");
            }
        }
Beispiel #3
0
 public static extern bool SetConsoleCursorInfo(
     IntPtr hConsoleOutput,
     [In][MarshalAs(UnmanagedType.LPStruct)] ConsoleCursorInfo lpConsoleCursorInfo);