public Coord GetFontSize(bool bMax)
        {
            if (disposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }
            ConsoleFontInfo cfi = new ConsoleFontInfo();

            if (!WinCon.GetCurrentConsoleFont(handle, bMax, cfi))
            {
                throw new ApplicationException("Unable to get font information.");
            }
            return(cfi.dwFontSize);
        }
Beispiel #2
0
 public Coord GetFontSize(bool bMax)
 {
     if (disposed)
     {
         throw new ObjectDisposedException(this.ToString());
     }
     ConsoleFontInfo cfi = new ConsoleFontInfo();
     if (!WinCon.GetCurrentConsoleFont(handle, bMax, cfi))
     {
         throw new ApplicationException("Unable to get font information.");
     }
     return cfi.dwFontSize;
 }
Beispiel #3
0
 public static extern bool GetCurrentConsoleFont(
     IntPtr hConsoleOutput,
     bool bMaximumWindow,
     [Out][MarshalAs(UnmanagedType.LPStruct)] ConsoleFontInfo lpConsoleCurrentFont);