C++ VB.NET 中的菜单栏样式?

发布于 2024-07-30 18:39:02 字数 556 浏览 8 评论 0原文

我找了很久这个,但似乎找不到。 当我在 vb .net 中添加菜单条时,它看起来像这样:

http:// img19.imageshack.us/img19/4341/menu1sbo.jpg http://img19.imageshack.us/img19/4341/menu1sbo.jpg

我希望它看起来像 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:

http://img19.imageshack.us/img19/4341/menu1sbo.jpg http://img19.imageshack.us/img19/4341/menu1sbo.jpg

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

往事风中埋 2024-08-06 18:39:02

您可能必须动手创建一个 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

不必在意 2024-08-06 18:39:02

您可能需要在项目设置中启用 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.

不…忘初心 2024-08-06 18:39:02

这个问题已经很老了,但对于其他感兴趣的人来说,您可以在 .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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文