我的主菜单在哪里?
菜单运行良好。生成成员已打开。问题是我试图在代码中操作它(放入一些动态项目),但我找不到它。
MainMenuStrip 为 null
。菜单为空
。它不能位于控件中,因为它不是从 Control
继承的。
它在哪里???
只是为了澄清:我希望通过代码找到菜单,而不是简单地知道组件的名称。我想获取传入的任何表格并找到它。
The menu works fine. GenerateMember is on. The problem is that I'm trying to manipulate it in code (to put in a few dynamic items) and I can't find it.
MainMenuStrip is null
. Menu is null
. It can't be in controls because it doesn't inherit from a Control
.
Where is it???
Just to make it clear: I'm looking to find the menu via code, not by simply knowing the name of the component. I want to take any form passed in and find it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试一下(假设只有一个
MenuStrip
):You can try this (assuming only one
MenuStrip
):