Thursday, January 28, 2010

Visual Basic: MenuStrip items not visible


I recently got into Visual Basic programming and encountered the following problem (as discribed by wy125 and seen in the image):
The menustrip for the MDI form works fine. But with child forms the menustrip items are not visible unless another child form is on top of it. When I select the form below the menustrip items disappear again.
 I have spent hours search for a solution with nothing, until wy125 answered his own question. THANK GOD!!

The solution

Okay, I'll post what I found just in case it helps someone else. I had recently added a MenuStrip to the MDI parent form and when I did this the menustrip items from the child forms were merging with the parent. The AllowMerge field controls this behavior. Setting this to false on the child form's menustrip resolves this.

 

Original forum post: http://forum.csharp-online.net/viewtopic.php?p=537&sid=fef80bedb53b815a6cad76da859d6c03

5 comments:

  1. Thanks. That was an irritating one for which ur solution was perfect

    ReplyDelete
  2. Thaks, very helpfull..

    ReplyDelete
  3. Thank you! That helped out a lot. Such a simple solution. I love you, The Internet.

    ReplyDelete