如何更改工具栏的背景颜色 [英] How to change the background color of toolbar

查看:110
本文介绍了如何更改工具栏的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WindowsForm。我想添加主题效果,这样如果用户选择颜色,表单将根据颜色选择更改颜色。

表单的BackColor属性对我有效我可以更改文件的背景颜色manu,但我想更改工具栏的backColor。



请建议。



在此先感谢。

I have a WindowsForm. I want to add the theme effect, so that if user select the color the form will change its color as per the color selection.
BackColor property of form works for me I can able to change backcolor of File manu, but I want to change the backColor of the tool bar also.

please suggest.

Thanks in advance.

推荐答案

方法1:(最简单的)

选择ToolStrip>>属性>> Backcolor>>选择任何该死的颜色。



方法2:

toolStrip1.BackColor = System .Drawing.SystemColors.ButtonFace;



-KR
Approach 1 : (easiest one)
Select ToolStrip >> Properties >> Backcolor >> Select any damn color.

Approach 2:
toolStrip1.BackColor = System.Drawing.SystemColors.ButtonFace;

-KR


你试过吗,



MainMenuStrip.BackColor = Color.FromKnownColor(KnownColor.Red);
Have you tried ,

MainMenuStrip.BackColor = Color.FromKnownColor(KnownColor.Red);


这篇关于如何更改工具栏的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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