【发布时间】:2012-07-23 07:21:43
【问题描述】:
我知道如何从注册表中检索壁纸:
HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper
但是如果用户选择使用纯色作为壁纸,我该如何检索该特定颜色?
【问题讨论】:
标签: windows registry wallpaper
我知道如何从注册表中检索壁纸:
HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper
但是如果用户选择使用纯色作为壁纸,我该如何检索该特定颜色?
【问题讨论】:
标签: windows registry wallpaper
你可以从
HKEY_CURRENT_USER\Control Panel\Colors\Background
它是一个包含空格分隔元组“R G B”的字符串,例如红色为“255 0 0”,橙色为“255 102 0”。
有关使用 C#、C++、F# 和 VB.NET 获取注册表值的信息,请参阅 here。
下面是 Powershell 的例子
# PowerShell Registry Key example
$Registry_Key = "HCU:\Control Panel\Colors\"
Get-ItemProperty -path $Registry_Key -name Background
【讨论】: