Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
Declare Function SetConsoleScreenBufferInfoEx Lib "kernel32.dll" (TODO) As TODO
User-Defined Types:
[StructLayout(LayoutKind.Sequential)]
public struct CONSOLE_SCREEN_BUFFER_INFO_EX
{
public uint cbSize;
public COORD dwSize;
public COORD dwCursorPosition;
public short wAttributes;
public SMALL_RECT srWindow;
public COORD dwMaximumWindowSize;
public ushort wPopupAttributes;
public bool bFullscreenSupported;
// Hack Hack Hack
// Too lazy to figure out the array at the moment...
//public COLORREF[16] ColorTable;
public COLORREF color0;
public COLORREF color1;
public COLORREF color2;
public COLORREF color3;
public COLORREF color4;
public COLORREF color5;
public COLORREF color6;
public COLORREF color7;
public COLORREF color8;
public COLORREF color9;
public COLORREF colorA;
public COLORREF colorB;
public COLORREF colorC;
public COLORREF colorD;
public COLORREF colorE;
public COLORREF colorF;
}
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
// Untested, added during 1-pass copy & paste of windows console fuctions
Debug.WriteLine("LargestWindowHeight=" + Console.LargestWindowHeight + " LargestWindowWidth=" + Console.LargestWindowWidth);
Debug.WriteLine("BufferHeight=" + Console.BufferHeight + " WindowHeight=" + Console.WindowHeight + " BufferWidth=" + Console.BufferWidth + " WindowWidth=" + Console.WindowWidth);
//// these are relative to the buffer, not the screen:
//Debug.WriteLine("WindowTop=" + Console.WindowTop + " WindowLeft=" + Console.WindowLeft);
Debug.WriteLine("ForegroundColor=" + Console.ForegroundColor + " BackgroundColor=" + Console.BackgroundColor);
Console.WriteLine("Some text in a console window");
Console.BackgroundColor = ConsoleColor.Cyan;
Console.ForegroundColor = ConsoleColor.Yellow;
Debug.WriteLine("ForegroundColor=" + Console.ForegroundColor + " BackgroundColor=" + Console.BackgroundColor);
Console.Write("Press ENTER to exit...");
Console.ReadLine();
}
}
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).