【问题标题】:How to find out the solid color used for the Windows Wallpaper?如何找出用于 Windows 壁纸的纯色?
【发布时间】:2012-07-23 07:21:43
【问题描述】:

我知道如何从注册表中检索壁纸:

HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper

但是如果用户选择使用纯色作为壁纸,我该如何检索该特定颜色?

【问题讨论】:

    标签: windows registry wallpaper


    【解决方案1】:

    你可以从

    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
    

    【讨论】:

    • 超级!为我工作。谢谢
    • 我做到了,注册表中的值正在改变,但背景的颜色没有,如果我从控制面板尝试,它会起作用,有什么建议吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-05
    相关资源
    最近更新 更多