I'm just wondering if there is a cmd/batch command out there to make a file full screen. I'm not just talking about maximized I'm talking about like full screen like when you are playing a game. I know that /max makes the program maximized not FULL screen. If you do not know what I mean just hit F11
on windows. Thanks!
Asked
Active
Viewed 1.3k times
1

Mamun
- 66,969
- 9
- 47
- 59

jish Bailey
- 15
- 1
- 1
- 5
-
Which Windows are you in? There's no fullscreen in cmd.exe for Vista through 8.1. It's only introduced back in Windows 10 – phuclv Jan 19 '18 at 06:26
-
2@LưuVĩnhPhúc, the CMD shell doesn't implement this. It's a feature of the console/terminal application that provides the window and standard I/O files. By default this is an instance of the console host process, conhost.exe (Windows 7+) in cooperation with the console device driver, condrv.sys (Windows 8+). – Eryk Sun Jan 19 '18 at 17:43
-
1@ErykSun I know about conhost.exe. But the OP probably wanted to make *another window* fullscreen not the console window. Beside F11 is not what's commonly used to make conhost fullscreen because it has always been Alt+Enter since decades ago – phuclv Oct 14 '21 at 00:05
3 Answers
0
You can do it but you'll need windowmode.bat and getCMDPid.bat:
call getcmdbit.bat
call windowmode.bat -pid %errorlevel% -mode maximized

npocmaka
- 55,367
- 18
- 148
- 187
-
1Maximized is not full screen. The console dropped support for full-screen mode in Vista, but the new console in Windows 10 brought it back. The hotkey toggle is Alt+Enter (or F11, but not in WSL). There's no API for it anymore, so you would need a little app to send this keyboard input to the console window. – Eryk Sun Jan 18 '18 at 22:24
-
@eryksun - hmm.. At the moment I can come with anything better. I'm failing to send alt+enter with the common send keys libraries - I'll need to check if it is possible to use p/invoke about that... – npocmaka Jan 19 '18 at 09:49
-
1Rather than using `SendInput`, it'll be more reliable to `PostMessage` the `WM_SYSKEYDOWN` and `WM_SYSKEYUP` messages for `VK_MENU` and `VK_RETURN` directly to the console window (from `GetConsoleWindow`). Also, to be more than a command that toggles full-screen mode, it needs to be able to query the current window state. A full-screen window should be top-most, checked via `GetWindowInfo`, and the rect from `GetWindowRect` should be the screen rect from `MonitorFromWindow` and `GetMonitorInfo`. – Eryk Sun Jan 19 '18 at 19:28