且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Windows窗体一个Windows 7风格的MenuStrip

更新时间:2023-12-06 11:37:10

尝试使用的 的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 $之间的差异C $ C>和的MenuStrip 更深入。