change color menu in design time
There is any form to 开发者_开发问答change the menu color when the mouse is over it in designing time in visual studio 2008? Or at least change all the menu items at the same time in execution time I'm using windows forms
I did't found a way to do this in desing time, but with code i need change the RenderMode to custom, by default use the the "manager" option.
It's not posible set a RenderMode of Custom directly; instead, the ToolStrip sets it when you supply a custom renderer.
Source here
with this, inherits a class of ToolStripRenderer
class CustomRenderer : ToolStripRenderer
{
//customize here
}
and call it when the forms is load
private void form_Load(object sender, EventArgs e)
{
menuStrip1.Renderer = new CustomRenderer();
}
精彩评论