根据 Windows 主题更改面板的主题(颜色) [英] Changing Theme(Color) of a panel according to Windows themes

查看:36
本文介绍了根据 Windows 主题更改面板的主题(颜色)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据当前选定的 Windows 主题更改面板的颜色.我已经设置了道具 EnableVisStyles.它会更改工具栏和 Windows 窗体的标题栏等内容.但是面板颜色保持不变.有什么办法可以做到这一点吗?

I want to change color of a panel according to current selected Windows theme. I have set the prop EnableVisStyles. It changes things like toolbar and Windows form's title bar. However the panel color remains same. Is there any way to achieve this?.

问候,严厉的苏曼

推荐答案

您可能已经设置了表单或面板的颜色.进入设计器,检查表单和面板上的 BackColor 属性.它们应该设置为控制(在系统选项卡下),而不是特定的颜色.

You have probably set the Form or the Panel's color. Go into the designer, and check the BackColor property on your form and the panel. They should be set to Control (under the System tab), not to a specific color.

这篇关于根据 Windows 主题更改面板的主题(颜色)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆