WinForms Application Theme

半腔热情 提交于 2019-12-11 03:55:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!