Menu Strip Control in VB.Net

Menu Strip Control in VB.Net

MenuStrip provides a menu system for a form.

Creating MenuStrip Control

Drag and drop MenuStrip control from the toolbox on the window Form.

MenuStrip Control in VB.Net

MenuStrip Control in VB.Net

Insert text in the MenuStrip which you want to display as the menu.

MenuStrip Control in VB.Net

 

MenuStrip Control in VB.Net

 When you click the database then the database menu will open and when the mouse is over the Programming language then Programming language menu will open.

MenuStrip Control in VB.Net

Positioning a MenuStrip: we can set the Position of MenuStrip through Dock property

Private Sub Form31_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Positioning a MenuStrip to left
        MenuStrip1.Dock = DockStyle.Left
End Sub

 

MenuStrip Control in VB.Net

MenuStrip properties 

GripStyle:  Gets or sets the visibility of the grip used to reposition the control. 

GripMargin : Gets or sets the space around the ToolStrip move handle.

The AutoSize: Where the Gets or sets a value indicating whether the control is automatically resized to display its entire contents.

The AllowMerge: Here Gets or sets a value indicating whether multiple MenuStrip can be combined.

Last updated:3/4/2020 3:48:31 AM
John Smith

John Smith

I am best.

0 Comments

Leave Comment