You can use the MergeIndex property to control how child items get merged into the container. How to use the MenuStrip Control In vb.net: First drag the MenuStrip Control from the toolbox on the form. ![]() Private Sub ToolStripMenuItem1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem1.Click. It is handy to leave this as True when designing your menus so that you can verify that all the child menu items have been merged correctly (they will be gone from the child menu). If you are looking for which 'item' was clicked you need to use the individual item clicked event. You can now set the child's MenuStrip.Visible property to False so that the child does not display a menu. Notice also that the File menu on the child is there, but has no items. Notice that the File menu on the container now contains A, B, and C. Notice that the File menu items are A and B.Ĭlick File -> A to create a child window. (ToolStripItem1) Me.Controls.Add(MenuStrip1) End Sub Sub ToolStripItem2Clicked(ByVal sender As Object, ByVal e As EventArgs) Handles ToolStripItem2. The MenuStrip control was introduced in version 2.0 of the.
0 Comments
Leave a Reply. |