使用Windows窗体一个Windows 7风格的MenuStrip [英] Using a Windows 7 style menustrip in Windows Forms

查看:253
本文介绍了使用Windows窗体一个Windows 7风格的MenuStrip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
标准的Windows菜单栏

我使用Windows Forms和当我使用的MenuStrip项目,我得到的东西看起来是这样的:

I am using windows forms and when I use a MenuStrip item, I get something that looks like this:

http://imgkk.com/i/ggn1.png

是否有可能使用的菜单像带系统使用,就像在Windows资源管理器或Firefox,例如的:

Is it possible to use menu strips like the ones the system uses, like in Windows Explorer, or Firefox, for example:

http://imgkk.com/i/cxyg.png

Windows窗体,或一般的C#?

with Windows Forms, or C# in general?

推荐答案

尝试使用的 的MainMenu 代替的MenuStrip 。在的MainMenu 将搭载于底层操作系统当前的风格,而的MenuStrip 没有。尽管的MainMenu 的MenuStrip 取代,但它仍然支持将转发(根据MSDN文档)。

Try using a MainMenu instead of a MenuStrip. The MainMenu will pick up the underlying operating system's current style, whereas the MenuStrip does not. Even though MainMenu was replaced with MenuStrip, it is still supported going forwards (according to the MSDN docs).

的MenuStrip 在C#中完全呈现,并且不使用当前操作系统的风格,而的MainMenu 控件呈现使用底层操作系统API并执行。

MenuStrip is rendered entirely in C# and does not use the current operating system's styles, whereas the MainMenu control renders using the underlying OS API and does.

的MainMenu 可能不能在你的工具箱。要添加它,请右键单击工具箱中,选择选择项目...,然后确保项目的MainMenu检查

MainMenu might not be in your toolbox. To add it, right click in the toolbox, select "Choose Items..." and then make sure the MainMenu item is checked.

This文章解释的MainMenu 的MenuStrip 更深入。

这篇关于使用Windows窗体一个Windows 7风格的MenuStrip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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