code_junkie

Colors in debug console

Nov 12th, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Console.ForegroundColor = ConsoleColor.Yellow;
  2. Console.BackgroundColor = ConsoleColor.DarkRed;
  3. Console.WriteLine("Test");
  4.  
  5. [DllImport("kernel32.dll")] public static extern bool SetConsoleTextAttribute(IntPtr hConsoleOutput, int wAttributes);
  6. [DllImport("kernel32.dll")] public static extern IntPtr GetStdHandle(uint nStdHandle);
Add Comment
Please, Sign In to add comment