gem56
asked on
How to determine 'Appearance > Color scheme' setting
Hi guys,
I have a VB6 application in which I need to determine 'Color scheme' setting (as per Control Panel > Appearance > Color scheme) so what API, etc. can I use to do that?
/Michael
I have a VB6 application in which I need to determine 'Color scheme' setting (as per Control Panel > Appearance > Color scheme) so what API, etc. can I use to do that?
/Michael
return 1 means success, returns 0 means failure.
FYI, list of available color schemes can be found in the registry here:
HKEY_CURRENT_USER\Control Panel\Appearance\Schemes
see screenshot1.
to get the display name which reflect each scheme id, goto:
HKEY_CURRENT_USER\Software \Classes\L ocal Settings\Software\Microsof t\Windows\ Shell\MuiC ache
see screenshot2
screenshot1.jpg
screenshot2.jpg
HKEY_CURRENT_USER\Control Panel\Appearance\Schemes
see screenshot1.
to get the display name which reflect each scheme id, goto:
HKEY_CURRENT_USER\Software
see screenshot2
screenshot1.jpg
screenshot2.jpg
ASKER
Thanks a lot for that sedgwick and I will most likely also use that API but for now I need to find out the current setting so is there an equivelant "DeskGetCurrentScheme" API?
I used Google
I used Google
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
so basically is using the following code:
{
string currentScheme = Registry.GetValue(@"HKEY_C URRENT_USE R\Control Panel\Appearance", "Current", null).ToString();
string schemeName = Registry.GetValue(@"HKEY_C URRENT_USE R\Software \Classes\L ocal Settings\Software\Microsof t\Windows\ Shell\MuiC ache", currentScheme, null).ToString();
{
string currentScheme = Registry.GetValue(@"HKEY_C
string schemeName = Registry.GetValue(@"HKEY_C
ASKER
Thanks a lot sedgwick.
change the scheme name to your favorite.
Open in new window