home *** CD-ROM | disk | FTP | other *** search
- @echo off
- REM ******************************************************************
- REM *** AltHome.cmd - Switch between full-screen OS/2 session and ***
- REM *** ver.1 Windowed OS/2 session, similar to the way ***
- REM *** the Alt-Home key combination switches in DOS ***
- REM ******************************************************************
-
- IF "%1"=="CALLING_MYSELF" GOTO CALLING_MYSELF
- CEnvi %0.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
- GOTO CENVI_EXIT
-
- #include <DosCalls.lib>
-
- #define SESSION_WINDOWABLEVIO 2
-
- NowWindowed = ( SESSION_WINDOWABLEVIO == GetSessionType() );
- SCREEN_WIDTH = ScreenSize().col;
- SCREEN_HEIGHT = ScreenSize().row;
-
- system("START /F %s AltHome.cmd CALLING_MYSELF",
- NowWindowed ? "/FS" : "/WIN" );
-
- GetSessionType() // return the type of this session
- {
- DosGetInfoBlocks(tInfo,pInfo);
- return peek(pInfo + (6 * 4),UWORD32);
- }
-
- :CENVI_EXIT
- EXIT
-
-
- :CALLING_MYSELF
- echo on
- MODE %SCREEN_WIDTH%,%SCREEN_HEIGHT%
- @echo off
- cls
- SET SCREEN_WIDTH=
- SET SCREEN_HEIGHT=