Ejemplo n.º 1
0
        public static void SetConsoleFont(string fontName = "Consolas")
        {
            CONSOLE_FONT_INFO_EX cfiex = new CONSOLE_FONT_INFO_EX();

            IntPtr hnd = GetStdHandle(STD_OUTPUT_HANDLE);

            GetCurrentConsoleFontEx(hnd, false, cfiex);

            cfiex.FaceName = fontName;

            SetCurrentConsoleFontEx(hnd, false, cfiex);
        }
Ejemplo n.º 2
0
 private static extern bool GetCurrentConsoleFontEx(IntPtr hConsoleOutput, bool bMaximumWindow, [In, Out] CONSOLE_FONT_INFO_EX lpConsoleCurrentFont);
Ejemplo n.º 3
0
 private static extern bool SetCurrentConsoleFontEx(IntPtr ConsoleOutput, bool MaximumWindow, CONSOLE_FONT_INFO_EX ConsoleCurrentFontEx);