In .NET, I can use the Console
class to change the color index (effectively 0-15) for the foreground and background colors of the console via Console.BackGroundColor
and Console.ForegroundColor
respectively. Both of these properties then use the Win32 SetConsoleTextAttribute
function to affect the change.
I can also use the ScreenColors
and PopupColors
keys in the registry, beneath HKEY_CURRENT_USER\Console
to change the background and foreground indexes for both the normal and popup foreground and background colors for the default console properties.
What I can't find is any means of changing the popup color indexes for the current console, either in the Console
.NET class, nor in the Win32 console APIs.
Does such an API exist, and if so, which one is it?