Full screen through batch command?

笑着哭i 提交于 2019-12-13 19:14:59

问题


I have a batch script under Windows. When anyone will click on that script I want the command window to become full screen like we do by keyboard shortcut [Alt+Enter].

Can it be done automatically using any command in batch file?


回答1:


In Windows XP, you need to start your program maximized (but not full screen) via "start /max" as follows:

start "Winow Title" /MAX "C:\batches\myfile.bat"

This command would be inside your original batch file, and call the real bath file.

I don't think there's a way to change the full screen-ness of an executing "cmd" command from within a batch file absent someone writing a special app to do so by emulating sending Alt+Enter to the parent process.

In Windows 7 (and probably Vista) you must run inside XP virtual machine for full screen mode.




回答2:


There is none. You can write a small program doing so for you, though. There is the SetConsoleDisplayMode function.



来源:https://stackoverflow.com/questions/4914858/full-screen-through-batch-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!