1. Home
  2. Computing & Technology
  3. Visual Basic
Migrating the Menu to VB .NET
Part 2: Entering the Event Code for the Menu
 More of this Feature
• Part 1: VB 6 and VB .NET Menu Programming
• Part 3: The Other VB 6 Menu Editor Options
• Part 4: VB .NET Menu Creation
• Part 5: The About Visual Basic Menu
 
 Related Resources
• User Interfaces in VB .NET
An About Visual Basic Review
 

At this point, you might want to enter the program code assocated with the menu. Each menu item is a component available in the VB 6 code editor. The only event for these components is the Click event.

To create a new top level menu, click the left arrow to move back to the left margin. The left and right arrow keys control the level of the menu items and the up and down arrow keys control which menu item is being edited. In a completed menu, the menu items that will appear from left to right on the form also appear from top to bottom in the Menu Editor. Clicking OK creates (or changes) the menu in the form. After the menu has been created, you can change the properties of the menu like any other component, either in your VB program (run time) or in advance (design time). In fact, it only makes sense to change the Enabled or Visible properties at run time. Why create a menu item if it is disabled or invisible? The only reason is that you plan to enable it or make it visible in your program.

Two Top Level Menu Items

Next page > The Other VB 6 Menu Editor Options > Page 1, 2, 3, 4, 5
Explore Visual Basic
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.