Jump to content

background color


 Share

Recommended Posts

where in windows (registry or other) is saved what wallpaper and what background color the desktop has ??

i want to make a program that changes this to play movies in desktop mode.

( i wanna upgrade my videoplayer )

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Link to comment
Share on other sites

where in windows (registry or other) is saved what wallpaper and what background color the desktop has ??

i want to make a program that changes this to play movies in desktop mode.

( i wanna upgrade my videoplayer )

HKEY_CURRENT_USER\Control Panel\Desktop


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

where in windows (registry or other) is saved what wallpaper and what background color the desktop has ??

i want to make a program that changes this to play movies in desktop mode.

( i wanna upgrade my videoplayer )

Background color with DLLCall, wallpaper path through Registry path (maybe there is a DLLCall, I don't remember):

Const $COLOR_DESKTOP = 1;Background color
$out = DllCall("user32", "long", "GetSysColor", "long", $COLOR_DESKTOP)

; BGR output to RGB mode
$hColor = Hex( $out[0], 6)
$hexColor = StringMid($hColor, 5, 2) & StringMid($hColor, 3, 2) & StringMid($hColor, 1, 2)

$sDesktopW = RegRead("HKCU\Control Panel\Desktop", "Wallpaper")
MsgBox(0, "", "Desktop color: " & $hColor & @LF & "Wallpaper: " & $sDesktopW)
Link to comment
Share on other sites

well i fond out the controlpanel\desktop thing, but is there also a way to set it ??

i tryed a color.reg that changes background to 16 0 16 (the color that i need) but the problem is that it doesn't "refresh" the desktop (like pressing apply)

is there a way to "apply" ??

btw where did you find that user32 command ??

is there a place with all those commands ??

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Link to comment
Share on other sites

i tryed some of that user32 on myself, its hard man ;)

this is what i tryed

Const $COLOR_DESKTOP = 1;Background color

Const $setcolor = 0x0016016

$out = DllCall("user32", "long", "SetSysColors", "long",1,"long",$COLOR_DESKTOP,"long",$setcolor )

msgBox(0,"debug",$out)

but it just won't work :P

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Link to comment
Share on other sites

Hi,

I haven´t the time now to prove it but, to refresh the registry you have to retsart the service for the thing you want to do. I don´t know if desktop uses a service, but i will look for next time. Or restart explorer.exe this will refresh it (not very elegant, and takink much time). If you want to know, how to restart a service look in my script. :mad2:My Script

I´m not sure that this will be fast enough, but i know no other way to refresh the registry. ;)

EDIT: Or get VLC and switch to walpaper mode. :P

Edited by Matrix112
Link to comment
Share on other sites

i know VLC but thats why i make this program, so ALL players can use desktopmode ;)

setsyscolors should work because it sends a repaint message to windows when its sucksessfull :P

*If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
Link to comment
Share on other sites

  • Moderators

$COLOR_DESKTOP = 1
$COLOR = 0xFFFFFF
$DLL_Call = DLLCall("user32.dll","int","SetSysColors","int",1,"int_ptr",$COLOR_DESKTOP,"int_ptr",$color)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...