Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- full_screen_mode_console_window_v1.c
- https://stackoverflow.com/questions/4053554/running-a-c-console-program-in-full-screen
- https://superuser.com/questions/285984/how-do-i-full-screen-my-cmd
- https://www.google.com/search?q=c+code+command+to+open+the+console+in+full+screen
- There are not a lot of video adapters around these days that still support this.
- Run cmd.exe and press Alt+Enter.
- If you get a message box that says "This system does not support fullscreen mode"
- then you're done.
- If it does switch to full screen then you can use
- SetConsoleDisplayMode() in your main() function.
- Of course, you don't know what your customer's machine is like, best not to pursue this.
- mode /?
- Configures system devices.
- Serial port: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]
- [to=on|off] [xon=on|off] [odsr=on|off]
- [octs=on|off] [dtr=on|off|hs]
- [rts=on|off|hs|tg] [idsr=on|off]
- Device Status: MODE [device] [/STATUS]
- Redirect printing: MODE LPTn[:]=COMm[:]
- Select code page: MODE CON[:] CP SELECT=yyy
- Code page status: MODE CON[:] CP [/STATUS]
- Display mode: MODE CON[:] [COLS=c] [LINES=n]
- Typematic rate: MODE CON[:] [RATE=r DELAY=d]
- You can find all my C programs at Dragan Milicev's pastebin:
- https://pastebin.com/u/dmilicev
- */
- #include <stdio.h>
- int main(void)
- {
- system("MODE 650"); // try with other numbers, 10, 30, 80, ...
- system("MODE CON: /STATUS");
- printf("\n This is console full screen mode. \n\n");
- system("PAUSE");
- system("MODE CON: COLS=50 LINES=20");
- system("MODE CON: /STATUS");
- printf("\n This is console mode COLS=50 LINES=20 \n\n");
- system("PAUSE");
- system("MODE CON: COLS=80 LINES=30");
- system("MODE CON: /STATUS");
- printf("\n This is console mode COLS=80 LINES=30 \n\n");
- return 0;
- } // main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement