Home and Learn: VB Net Course

Add a Sub Menu to your VB.NET Form

This tutorial assumes that you have completed the first one.

A sub menu is one that branches of a menu item. They usually have an arrow to indicate that there's an extra menu available. You will have seen these plenty of times in Windows programmes.

You can create our own sub menus quite easily. Try this:

  1. Return to the Form view (Shift + F7 is a shortcut)
  2. Click on your File menu so that you can see it all
  3. Select the New item (Careful where you click. Click once on the left edge). You should see this:

Select the New item

  1. Click on the "Type Here" just to the right of New
  2. You'll see yet more "Type Here" areas:

A sub menu area appears

  1. Type New Project, and then hit the return key on your keyboard
  2. Type in New File and then click away from the menu, somewhere on the form
  3. You will then have a menu like this one:

The two new items have been added

  1. Save your work, and then run your programme. Click your new menu to see the following:

The New Sub Menu

Of course, none of the menu items work except the Exit menu. But you should have found that adding menus to your programmes is an easy matter with VB.NET.

One more thing we can do. If you look closely at a lot of menu items, you see that they have shortcuts attached. There's two types of shortcuts: An underline shortcut, and a key combination shortcut. We'll see how to do that in the next section.

Back to the VB NET Contents Page


Buy the Book of this Course

Email us: enquiry at homeandlearn.co.uk