[DllImport("kernel32.dll", SetLastError = true)]
static extern bool SetCurrentConsoleFontEx(
IntPtr ConsoleOutput,
bool MaximumWindow,
CONSOLE_FONT_INFO_EX ConsoleCurrentFontEx
);
Declare Function SetCurrentConsoleFontEx Lib "kernel32.dll" (TODO) As TODO
[StructLayout(LayoutKind.Sequential)]
public struct COORD
{
public short X;
public short Y;
public COORD(short X, short Y)
{
this.X = X;
this.Y = Y;
}
};
[StructLayout(LayoutKind.Sequential)]
public struct CONSOLE_FONT_INFO_EX
{
public uint cbSize;
public uint nFont;
public COORD dwFontSize;
public ushort FontFamily;
public ushort FontWeight;
fixed char FaceName[32]; // this will require the assembly to be unsafe
}
Or alternatively if you can't afford unsafe assemblies
[StructLayout(LayoutKind.Sequential)]
public struct CONSOLE_FONT_INFO_EX
{
public uint cbSize;
public uint nFont;
public COORD dwFontSize;
public ushort FontFamily;
public ushort FontWeight;
UInt64 face0, face1, face2, face3, face4, face5, face6, face7;
}
Do you know one? Please contribute it!
// Untested, added during 1-pass copy & paste of windows console fuctions
// Tested on Windows XP SP2, with Visual Studio 2008, and throws an exception. "Entry point not found". Ideas?
Minimum supported client: Windows Vista
Please add some!
Please add some!