Re: XP colorscheme detection Help wanted

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Zoury (yanick_lefebvre_at_hotmail.com)
Date: 04/30/04


Date: Fri, 30 Apr 2004 14:11:05 -0400

Hi John! :O)

I don't know which API (if any) could give you this information directly but
you can read the following registry key/value

key :
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager

value :
ColorName

if don't know how to read a key from the registry :

HOWTO: Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q145679

here's a really basic class that can save you some time..
http://groups.google.com/groups?selm=%2333VNZD1CHA.1768%40TK2MSFTNGP12

sample of use :
'***
' Module1
Option Explicit

Private Sub Main()

    Dim reg As CRegistry
    Set reg = New CRegistry

    Select Case reg.GetValue(rkcCurrentUser, _

"Software\Microsoft\Windows\CurrentVersion\ThemeManager", _
                             "ColorName")

        Case "NormalColor"
            Debug.Print "Default (blue)"

        Case "HomeStead"
            Debug.Print "Olive Green"

        Case "Metallic"
            Debug.Print "Silver"

        Case Else
            Debug.Print "Unknown Color Scheme"

    End Select

End Sub
'***

-- 
Best Regards
Yanick Lefebvre
"JohnK" <johnk@noreply.net> wrote in message
news:40927f81$0$144$3a628fcd@reader2.nntp.hccnet.nl...
> Hi
>
> I need to determine what colorscheme XP is using, as there is Standard
blue,
> Olive green and Silver. How can I get a value within a VB program. Can you
> give an example please?
> Second, the app. I'm making runs on different Windows versions, so only
when
> running XP the colortscheme option are needed. How can I see the Win
version
> running on? Do you have an example?
>
> Thanks,
>
> John
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.672 / Virus Database: 434 - Release Date: 28-4-2004
>
>