문제

I have exactly followed the steps described in Merge menu strip items for MDI windows to create a test application with an MDI container and an MDI child with a File menu. I have tried this in Visual Studio 2013 for every .NET framework from 2.0 to 4.5, and also tried in Visual Studio 2012. The result is the same. The menus do not merge. All I get is this:

enter image description here

The two file menus are supposed to be one, or at least both be in the menu bar. What's going on? How is one supposed to get these menus to automatically merge?

도움이 되었습니까?

해결책

In your Form2 constructor, set the visibility of the MenuStrip control to false:

public Form2() {
  InitializeComponent();
  menuStrip1.Visible = false;
}

The "C" menu should be visible on the main form's File menu.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top