eHow launches Android app: Get the best of eHow on the go.

How To

How to Add a Menu Strip to a VB.net Application

Member
By Mike
User-Submitted Article
(5 Ratings)
VB.net
VB.net

Every windows application, or practically every windows application has menus. If you are writing a VB.net application, here is how you can add one.

Difficulty: Easy
Instructions

Things You'll Need:

  • VB.net
  1. Step 1

    Open VB.net and create a new project.

  2. Step 2
    Menus & Toolbars
    Menus & Toolbars

    In your Toolbox look for the section labeled "Menus & Toolbars".

  3. Step 3
    MenuStrip
    MenuStrip

    Look for the item labeled "MenuStrip". Click on it. You will see your mousepointer change from an arror to a smaller icon of the control you are about to add to your form.

  4. Step 4
    Added to Form
    Added to Form

    Now click on your form to add the Menu strip to your application.

  5. Step 5

    Now that it has been added to the form we can create some menu options. For our example we will use "File" as out top level menu item and "Exit" as a submenu item under "File".

  6. Step 6
    File
    File

    Click where it says "Type Here". It will change to a textbox where you can type in what the menu item wil display to the user. Type in "File".

  7. Step 7
    New Menu item
    New Menu item

    You will also notice as you click on the area that says "Type Here", a new menu item for you to choose will be created to its right and one below.

  8. Step 8
    Submenu
    Submenu

    In the new menu item below "File" click where it says "Type Here".

  9. Step 9
    Exit Menu item
    Exit Menu item

    In the blank box type in "Exit" and hit your enter key on your keyboard. This will be our submenu item. We are now done creating our example menu structure.

  10. Step 10
    Click event
    Click event

    Now that you have your menu structure complete, it has to do something. For our example we are going to use the Exit submenu item as a means to end the program. Double click on the "Exit" submenu item that you created. This will bring up the menu item's click event.

  11. Step 11
    Code
    Code

    In the click event type in the code:

    END

    This will end the program.

  12. Step 12
    Run
    Run

    Run your program by clicking the F5 key on your keyboard.

  13. Step 13

    Click File then click Exit. Notice how your program ends.

Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Tags
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics