MenuStrip Control in VB.NET

In this article we will learn what is MenuStrip Control and how to use it.
  • 2091
Download Files:

A Visual Basic MenuStrip Control Provides a MenuBar On the form.It replaces the Features of  MainMenu control.It provides an application menu system. this control support overflow, menu merging, tool tips.MenuStrip Control works with Multiple Document InterFace(MDI) and also with Single Document Interface(SDI).

Properties of MenuStripControl:-

  • ShortcutKeys: Either you can Get or set the shortcut keys available with the ToolStripMenuItem
  • CanOverflow: you can get or set a value showing whether the MenuStrip Support OverFlow feature.
  • GripStyle: For the visibility of the grip used to reposition the control.
  • AutoSize: a value Showing whether the control is automatically resized to display its entire contents.

How to use the MenuStrip Control In

  • First drag the MenuStrip Control from the toolbox on the form .than the window will looks like the below window


  • Now add the Menu items.After adding the menu names the form looks Like the below Form

  • Now Type Text to create  SubMenu of the Menu

  • Than add the Following code on the Form load to show the MenuStrip on left side

    PrivateSub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles MyBase.Load
        'Shows a MenuStrip to left
         MenuStrip1.Dock = DockStyle.Left





More Articles

© 2013 dotNetheaven. All rights reserved.