예제 #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]);
            }
            Console.ReadKey();
        }
예제 #2
0
 static extern bool GetConsoleScreenBufferInfoEx(IntPtr handle, ref CONSOLE_SCREEN_BUFFER_INFOEX info);