In C# and DirectX games I use to just use the below code to achieve this, I am wondering if something similar works in XNA (note this opens a window but it is unable to accept input or write output):
[DllImport("kernel32.dll")]
public static extern Int32 AllocConsole();
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
public static extern IntPtr SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int x, int Y, int cx, int cy, int wFlags);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr GetConsoleWindow();
public void init() {
AllocConsole();
IntPtr MyConsole = GetConsoleWindow();
SetWindowPos(MyConsole, 0, 0, 0, 0, 0, 0x0001);
Console.WriteLine("*************************************************************");
Console.WriteLine("\t\t\tDEBUG CONSOLE");
Console.WriteLine("*************************************************************");
}
Any help or suggestions would be greatly appreciated.







