Click here to Skip to main content
15,895,370 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to determine the current user's color settings for the windows 8 start screen (both colors - light and dark). I've figured out how to get the taskbar color, but I also need the secondary color. Please help.
Posted
Comments
Dave Kreskowiak 6-Apr-13 10:14am    
Why? What is this information foing to be used for?
7774tlas 6-Apr-13 16:51pm    
I want to use them to color the form and controls, so that the app matches the user's theme (I'm using a borderless form). I've managed to set the form's backcolor to the "primary" color, but I need to know the "secondary" color so that I can set my buttons, etc., to it's shade.

1 solution

You can try this: SystemColors Class[^]
 
Share this answer
 
Comments
7774tlas 6-Apr-13 21:01pm    
All of those seem to be the default system colors, I need to get the color values of the Metro/Modern Start Screen. This is the code that I used to get the primary color:

Dim aarrggbb = My.Computer.Registry.GetValue_("HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM", "ColorizationColor", "00000000")
Dim argb = Convert.ToInt32(CLng(aarrggbb.ToString), 10)
Dim argbcol = System.Drawing.Color.FromArgb(argb)
Dim USERCOLOR1 As Color
USERCOLOR1 = Color.FromArgb(argb)
This ^ changes the form's border to the same color as the taskbar.
I don't know which registry value is the secondary color though, and I've never worked with the registry so I'm nervous that I might mess something up. Any ideas?
Dave Kreskowiak 7-Apr-13 10:53am    
Don't know. I don't use Win8 so I have nothing to test against.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900