MDI Parent Menu and Child Menu

泪湿孤枕 提交于 2019-12-13 20:39:09

问题


I am using VB.Net on Winforms Development developing an MDI application.

In my Parent form, I have a menu strip. In my child forms, I also have a menu strip attached to each form, which invokes a different set of command when accessed. Is it possible then that in an MDI form, the child form which is currently active be the menu that would display in the parent form?


回答1:


It's easy. Just add a MenuStrip to the parent but leave it empty. The built-in support for menu merging ensures that the active child's menu appears in the empty parent strip.



来源:https://stackoverflow.com/questions/261350/mdi-parent-menu-and-child-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!