Esempio n. 1
0
        unsafe static void Main()
        {
            IntPtr handle = GetStdHandle(StdOutputHandle);
            CONSOLE_SCREEN_BUFFER_INFOEX info;
            info = new CONSOLE_SCREEN_BUFFER_INFOEX();
            info.StructureSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX);
            GetConsoleScreenBufferInfoEx(handle, ref info);

            for (int i = 0; i < 16; i++)
            {
                Console.WriteLine("{0:x6}", info.ColorTable[i]);
            }
        }
Esempio n. 2
0
        public unsafe static void MainDemo()
        {
            IntPtr handle = GetStdHandle(StdOutputHandle);
            CONSOLE_SCREEN_BUFFER_INFOEX info;

            info = new CONSOLE_SCREEN_BUFFER_INFOEX();
            info.StructureSize = sizeof(CONSOLE_SCREEN_BUFFER_INFOEX);
            GetConsoleScreenBufferInfoEx(handle, ref info);

            for (int i = 0; i < 16; i++)
            {
                Console.WriteLine($"{info.ColorTable[i]}:x6");
            }
        }
Esempio n. 3
0
 static extern bool GetConsoleScreenBufferInfoEx
     (IntPtr handle, ref CONSOLE_SCREEN_BUFFER_INFOEX info);
Esempio n. 4
0
 static extern bool GetConsoleScreenBufferInfoEx(IntPtr handle, ref CONSOLE_SCREEN_BUFFER_INFOEX info);