问题
Is there any way to change the SystemColors.ButtonHighlight color only for my WinForms application? I would like to give a different theme to it.
Thanks.
回答1:
That would be nice, wouldn't it?
I'm afraid the only options are to draw the button yourself (use Reflector to see how WinForms paints it), or buy a third-party skinning framework.
回答2:
DotNetSkin provides a DLL which can be easily used in an application to change full theme including the title bar of the application that would not depend upon Windows theme.
Many themes are available there or you can create your own theme or use any .msStyle
file in your application.
回答3:
I think you'd have to make a custom control that inherits a button, then override the OnPaint event and draw the ButtonHighlight (and probably the rest of the button as well) yourself.
来源:https://stackoverflow.com/questions/4087769/winforms-application-theme