diff --git a/source/setbgcol.pb b/source/setbgcol.pb index c39e2a7..111231a 100644 --- a/source/setbgcol.pb +++ b/source/setbgcol.pb @@ -1,15 +1,44 @@ -; -; change Windows Background Colour +; setbgcol.pb +; ------------------------------------------------------------ +; changes windows background colour +; LICENSE : GPL +; AUTHOR : Michael H.G. Schmidt +; EMAIL : michael@schmidt2.de +; DATE : 20190524 +; ------------------------------------------------------------ +; + +OpenConsole() +EnableGraphicalConsole(0) + +; check commandline... +If ( CountProgramParameters() = 0 Or CountProgramParameters() >4 ) + PrintN("") + PrintN("usage: setbgcol ") + PrintN(" sets windows background colour") + End 99 +EndIf + +; +; MAIN ; Dim lpaElements(0) Dim lpaRgbValues(0) +R$ = ProgramParameter(0) +G$ = ProgramParameter(1) +B$ = ProgramParameter(2) + +PrintN("R=" + R$ + ", G=" + G$ + ", B=" + B$) + lpaElements(0) = #COLOR_BACKGROUND -lpaRgbValues(0) = RGB(3,131,135) +lpaRgbValues(0) = RGB(Val(R$),Val(G$),Val(B$)) SetSysColors_(1,@lpaElements(),@lpaRgbValues(0)) -; IDE Options = PureBasic 5.70 LTS (Windows - x64) -; CursorPosition = 11 +CloseConsole() + +; IDE Options = PureBasic 5.73 LTS (Windows - x64) +; CursorPosition = 35 ; EnableXP \ No newline at end of file diff --git a/tools/logon.cmd b/tools/logon.cmd index bf5e62b..73962b6 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -10,8 +10,8 @@ echo removing wallpaper ... reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallPaper /t REG_SZ /d " " /f 1>nul RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters -echo set desktop colour ... -%TOOLS%\setbgcol +echo set desktop colour (RGB) ... +%TOOLS%\setbgcol 3 131 135 echo starting BGInfo ... %TOOLS%\bginfo\bginfo64.exe %TOOLS%\bginfo\config.bgi /NOLICPROMPT /silent /timer:0 diff --git a/tools/setbgcol.exe b/tools/setbgcol.exe index 70be70e..c5d8eef 100644 Binary files a/tools/setbgcol.exe and b/tools/setbgcol.exe differ