China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-07 08:45
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » About the selection of various methods to achieve P full screen [slore to solve the networking problem] View 2,647 Replies 15
Floor 16 Posted 2010-05-01 11:38 ·  中国 山西 临汾 侯马市 电信
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline
Modified the full-screen switching display code. Mainly, the corresponding key values in the registry were protected on-site. At the same time, using start with a title to switch the display mode is simpler and more flexible, and it does not affect the analysis of the batch processing itself command line parameters.


@echo off & setlocal
if "%ShowMode%"=="FullScreen" goto :FullScreen
if "%ShowMode%"=="WindowMode" goto :WindowMode
REG Add HKCU\Console\FullScreen /v FullScreen /t REG_DWORD /d 1 /f>nul
REG Add HKCU\Console\WindowMode /v FullScreen /t REG_DWORD /d 0 /f>nul
set InitMode=true

echo The demonstration is about to begin, first it will enter full screen mode
pause
set ShowMode=FullScreen
start "FullScreen" %0 %*
goto :end

:FullScreen
echo This is working in full screen display mode
echo Working in full screen mode.
echo Now it will return to normal window mode
pause
set ShowMode=WindowMode
start "WindowMode" %0 %*
goto :end

:WindowMode
echo This is working in window display mode
echo Working in normal window mode.
echo Display ends, about to exit
pause
goto :end

:end
REG delete HKCU\Console\FullScreen /f>nul
REG delete HKCU\Console\WindowMode /f>nul
exit
Forum Jump: