VBcoders Guest

Don't have an account yet? Register

Forgot Password?

console application full screen

by DVM (2 Submissions)
Category: Registry
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

get your vbscript console applications running under cscript using the stdin & stdout objects for input running full-screen. and get the fore and background collor set to the color you like

Rate console application full screen

option explicit
dim oShell: set oShell = CreateObject("WScript.Shell")
' asume it started tweaked
dim bTweaked: bTweaked = true
' is it tweaked?
if wscript.arguments.count = 0 then
 bTweaked = false
elseif not wscript.arguments(0) = "tweaked" then 
 bTweaked = false
end if
' if not, let's tweak it
if not bTweaked then
 dim kFullScreen, kScreenColors
 kFullScreen = oShell.regRead("HKCU\Console\FullScreen")
 kScreenColors = oShell.regRead("HKCU\Console\ScreenColors")
 oShell.regwrite "HKCU\Console\FullScreen", 1, "REG_DWORD"
 oShell.regWrite "HKCU\Console\ScreenColors", 9, "REG_DWORD"
 oShell.run "cscript.exe /NoLogo """ & wscript.scriptfullname & """ tweaked"
 wscript.sleep 5000
 oShell.regwrite "HKCU\Console\FullScreen", kFullScreen, "REG_DWORD"
 oShell.regWrite "HKCU\Console\ScreenColors", kScreenColors, "REG_DWORD"
 set oShell = nothing
end if
dim oIn: set oIn = wscript.stdIn
dim oOut: set oOut = wscript.stdOut
oOut.writeLine "press enter to contintue..."
call oIn.readLine

Download this snippet    Add to My Saved Code

console application full screen Comments

No comments have been posted about console application full screen. Why not be the first to post a comment about console application full screen.

Post your comment

0/1000 characters