changing desktop colour doesn't work
-
Hi, I'm trying to change the background colour of my desktop. Here's the code I'm using:
RegistryKey rkWallColor = Registry.CurrentUser.OpenSubKey("Control Panel\\\\Colors", true); rkWallColor.SetValue("Background", "0 0 64"); rkWallColor.Close();
I'm sure that I'm doing it right, but the desktop colour wont change. I've checked the registry key and it has been changed. Am I accessing the wrong key? I'm using windows xp. Can anyone see what I'm doing wrong? Thanks
-
Hi, I'm trying to change the background colour of my desktop. Here's the code I'm using:
RegistryKey rkWallColor = Registry.CurrentUser.OpenSubKey("Control Panel\\\\Colors", true); rkWallColor.SetValue("Background", "0 0 64"); rkWallColor.Close();
I'm sure that I'm doing it right, but the desktop colour wont change. I've checked the registry key and it has been changed. Am I accessing the wrong key? I'm using windows xp. Can anyone see what I'm doing wrong? Thanks
Changing only the registry values will not change the background color. Have a look at the API: SetSysColors. It is present in user32.dll If you want to change the wallpaper and get related information, have a look at SystemParametersInfo which is also present in user32.dll
regards :)
-
Changing only the registry values will not change the background color. Have a look at the API: SetSysColors. It is present in user32.dll If you want to change the wallpaper and get related information, have a look at SystemParametersInfo which is also present in user32.dll
regards :)
Thanks, after turning my computer on this morning the background colour has changed, so it seems as though it is working, just not picking up the changes until a reboot.. I thought I should be able to do it through the registry keys as with changing the wallpaper (Which I'm already doing)? I'll have a look at SetSysColors and see where I get. Thanks
-
Thanks, after turning my computer on this morning the background colour has changed, so it seems as though it is working, just not picking up the changes until a reboot.. I thought I should be able to do it through the registry keys as with changing the wallpaper (Which I'm already doing)? I'll have a look at SetSysColors and see where I get. Thanks
okay, after looking into it, it seems that I need to use a combination of the api, and registry keys. I've got it working wonderfully! Thanks you again for the gentle nudge in the right direction :)
-
okay, after looking into it, it seems that I need to use a combination of the api, and registry keys. I've got it working wonderfully! Thanks you again for the gentle nudge in the right direction :)
Glad to help by the way, my nickname's changed
regards :)