Windows 窗体中的标准 Windows 菜单栏 [英] Standard Windows menu bars in Windows Forms

查看:25
本文介绍了Windows 窗体中的标准 Windows 菜单栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到将 MenuStrip(来自工具箱)添加到我的表单设计中并不会产生像许多本机 Windows 应用程序中看到的菜单栏.相反,我得到了一个类似于 Visual Studio 自己的菜单栏.MenuStrip 的任何样式设置似乎都无法模仿更常见的原生菜单栏.

I noticed that adding a MenuStrip (from the Toolbox) to my form design doesn't yield a menu bar like the one seen in many native Windows applications. Instead I get a menu bar like Visual Studio's own. None of the style settings for MenuStrip appear to mimic the much more common native menu bar.

有没有办法将菜单栏添加到我的 Windows 窗体应用程序中,该菜单栏看起来与您在记事本、任务管理器和其他应用程序中看到的相同?(最好与设计师一起,但我也不介意以编程方式添加它.)

Is there a way to add a menu bar to my Windows Forms application that looks the same as the one you see in Notepad, Task Manager and others? (Preferably with the designer, but I wouldn't mind adding it programmatically either.)

说明截图:

推荐答案

转到您的工具箱,右键单击其中的任意位置并选择选择项目".

Go to your Toolbox, right click anywhere inside and select "Choose Items".

当对话框加载并出现时,向下滚动直到看到 MainMenu.将其添加到工具箱中,您就拥有了一个原生菜单栏!

When the dialog loads and appears, scroll down til you see MainMenu. Add that to the toolbox, and you've got yourself a native menu bar!

这篇关于Windows 窗体中的标准 Windows 菜单栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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