如何在windows窗体中更改menustrip的背景颜色? [英] How to change background color of menustrip in windows form?

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

问题描述




在Windows应用程序中,我将表单的背景颜色更改为浅绿色。

但我在表单中使用的菜单条背景仍然是对照颜色。



我在Form的财产中检查过。但在属性中,后面的圆形颜色是浅绿色。

在视图菜单中,条带背景为控制颜色。



如何更改颜色?

请帮帮我



谢谢

Saranya1388

解决方案

尝试:

 myMenuStrip.BackColor = Color.LightGreen; 


If没有您需要的标准属性,您可以随时创建自己的控件,例如:

ToolStrip,MenuStrip和StatusStrip控件的自定义渲染 [ ^ ]



这个例子也不错:

如何:为Windows窗体中的ToolStrip控件创建和设置自定义渲染器 [ ^ ]


< blockquote> select menustrip - >按f4(属性) - >背面颜色


Hi
In windows application , I have changed background color of a form to light green.
But the menu strip i have used in the form background is still in control color.

I checked in Form's property . but In property the back round color is light green.
In view menu strip background is in Control color.

How to change the color?
please help me

Thanks
Saranya1388

解决方案

Try:

myMenuStrip.BackColor = Color.LightGreen;


If there are no standard properties that you need you can always create your own control, here is example:
Custom Rendering for the ToolStrip, MenuStrip, and StatusStrip controls[^]

And this example is not bad:
How to: Create and Set a Custom Renderer for the ToolStrip Control in Windows Forms[^]


select menustrip ->press f4(properties)--> back color


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

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