Maximize Console Window

[DllImport("kernel32.dll")]
private static extern IntPtr GetStdHandle(int handle);
[DllImport("kernel32.dll")]
private static extern bool SetConsoleDisplayMode(IntPtr hConsole, int mode);
 
IntPtr hConsole = GetStdHandle(-11);   // get console handle
SetConsoleDisplayMode(hConsole, 1);    // make console fullscreen

Use SetConsoleDisplayMode(hConsole, 2); to go back to windowed console.


 
snippets/c-sharp/maximize-console.txt · Last modified: 2009-01-29 16:41.03 by mbirth
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki Contents powered by Club-Mate Contents powered by BassDrive.com Labelled with ICRA