Originally published on: Tue, 20 Apr 2010 03:00:23 +0000
About a month ago, I wrote about using Windows Console functions to change the active text color of the console window.
See http://www.mailsend-online.com/blog?p=78.
I now present some Console API code that will allow one to change the active console screen to full-screen mode or to windowed mode.
fullscreen.c
The SetConsoleDisplayMode() function accepts three parameters:
I omit the COORD data structure reference in the above code so that the given program will simply change between modes, but will not attempt to change to a custom size.
To change a console screen to full-screen mode, enter the following at a command-prompt or in a batch file: fullscreen -f
To change to windowed mode, enter the following: fullscreen -w
The source code and executable file for fullscreen can be downloaded from a single archive at: http://www.mailsend-online.com/wp/fullscreen.zip
Unless otherwise noted, all code and text entries are Copyright ©2010 by James K. Lawless
Save to del.icio.us
Save to StumbleUpon
Digg it
Save to Reddit
Share on Facebook
Share on Twitter
More bookmarks
Subscribe!
Auto Save Clipboard Images Redux
Extending SpiderMonkey JavaScript on Windows
Rhino JavaScript to EXE with launch4j
Compiling Rhino JavaScript to Java
Directory Traversal in Rhino JavaScript
A Command-Line MP3 Player for Windows
Auto Save Images from the Clipboard
Java in a Windows EXE with launch4j
An Interview with Tom Zimmer: Forth System Developer
Setting Windows Console Text Colors in C
Tracing XSLT with a Tiny Java Web Server
An Interview with Game Developer James Hague
Internet Protocols and Rhino JavaScript
Rhino JavaScript to EXE with launch4j
Invoking the Default Windows Screen-Saver
A Scrolling Banner using Canvas and JavaScript
Changing the C64 Text Color in C
An Interview with the Creator of the BDS C Compiler
MicroISV on a Shoestring
DadHacker
The Bottom Feeder
Writin' That Code!
The Recursive ISV
The Thomsen Blog
Prototypically Speaking
The Reinvigorated Programmer