C++ VB.NET 中的菜单栏样式?
我找了很久这个,但似乎找不到。 当我在 vb .net 中添加菜单条时,它看起来像这样:
我希望它看起来像 WinRar、计算器、记事本等菜单这个:
http://img8.imageshack.us/img8/307/menu1a.jpg http ://img8.imageshack.us/img8/307/menu1a.jpg
据我所知,在 vb 6 中你可以创建一个主菜单并这样做,但在 vb .net 中似乎只有这些菜单条很丑。
谢谢
Ive been looking a long time for this, but can't seem to find it. When I add a menu strip in vb .net, it looks like this:
and I want it to look like the WinRar, Calculator, Notepad etc menus like this:
http://img8.imageshack.us/img8/307/menu1a.jpg http://img8.imageshack.us/img8/307/menu1a.jpg
From what I gathered, in vb 6 you could create a mainmenu and do it this way, but in vb .net it seems like all there is is ugly menustrip.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能必须动手创建一个 CustomRenderer(ToolStripProfessionalRenderer )应用于ToolStripManager
无需过多重复,此文档看起来像不错的概述,或者您随时可以选择Microsoft 教程
menustrip 源自toolstrip
You may have to get dirty and create a CustomRenderer(ToolStripProfessionalRenderer) to apply to the ToolStripManager
Without rehashing to much, this doc looks like a nice overview or you can always opt for the Microsoft tutorial
menustrip is derived from toolstrip
您可能需要在项目设置中启用 XP 主题支持。 为此,请转到解决方案资源管理器中的“我的项目”,并确保在“应用程序”选项卡底部附近的 Windows 应用程序框架属性组下选中“启用 XP 视觉样式”。
如果这不起作用,您可能需要按照 MSDN 文章。
You may need to enable XP theme support in your project settings. To do this, go to My Project in your Solution Explorer, and make sure "Enable XP Visual Styles" is checked under the Windows application framework properties group down near the bottom of the Application tab.
If this doesn't work, you might need to create an application manifest as described in this MSDN article.
这个问题已经很老了,但对于其他感兴趣的人来说,您可以在 .NET 框架组件中找到这种类型的菜单。 只需右键单击工具箱-> 选择项目-> 主菜单的 .NET Framework 组件和过滤器。 其工作原理与我迄今为止所看到的任何其他菜单条完全相同。
This question is quite old but for anyone else interested, you can find this type of menu in the .NET framework components. Just right click the Toolbox -> Choose items -> .NET Framework Components and filter for MainMenu. Works exactly like any other menu strip from what I've seen so far.