Let's say I have the following code:
Dim _Brush_Disabled As New SolidBrush(Color.FromKnownC开发者_如何学Color(KnownColor.GrayText))
Dim _Brush_Enabled As New SolidBrush(Color.FromKnownColor(KnownColor.WindowText))
Sub Do_Something()
'
' ... _Brush_Disabled and _Brush_Enabled are repeatedly used in this sub
'
End Sub
Will _Brush_Disabled and _Brush_Enabled automatically change their colors if the Windows color scheme changes?
If not, how can I make them 'track' Windows color scheme changes?
No, it won't automatically update for you. You can listen for the WM_SYSCOLORCHANGE event on your main window (or where ever your brushes are defined) to know when to update.
More information can be found here and here.
加载中,请稍侯......
精彩评论