|
-
May 18th, 2020, 02:41 AM
#1
Thread Starter
Lively Member
Get the highlight color of OS-styled ListView header in Windows 10 Explorer
Is there a way to retrieve the color used to highlight the hot column header under the mouse pointer in Windows 10 Explorer?

I tried to use the VisualStyleRenderer class for that but no luck:
Code:
Dim renderer As New VisualStyleRenderer(VisualStyleElement.Header.Item.Hot)
Dim hotColor As Color = renderer.GetColor(ColorProperty.FillColor)
The best result closest to the required color was ColorProperty.EdgeHighlightColor, but it is not exactly what I am looking for. The current highlight color is [R=217, G=235, B=249] in Windows 10 v1909, ColorProperty.EdgeHighlightColor returns [R=244, G=247, B=252].
I know I can draw the hot column header on a temporary bitmap and then try to retrieve the hot color using the GetPixel() method, but I think this is not a reliable way. Microsoft may change the hot background to a gradient or something like that in the future, but what I need is the solid color used to fill the hot column header.
Last edited by wisekat; May 18th, 2020 at 02:57 AM.
Reason: Added RGB color values
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|