Creating Top-Level Menus in Visual Basic
Despite Microsoft's move towards so called Ribbon based navigation, every other application still relies on menus to provide an easy way for users to navigate around a user interface. In fact, the jury is still out on whether Ribbon style interfaces of the type found in Microsoft Office 2007 are actually easier to use than menus.
Since it is almost impossible creat an application without needing a menu of some sort, this chapter is dedicated entirely to the topic of creating both top-level and context menus in Visual Basic. As you will see as we work through this topic, Visual Basic combined with Visual Studio make the creation of menus extremely easy.
Creating a Top-Level Menu
Top-level menus (the type of menus that run across the top of forms) are created using the Menu Strip control. The first step in creating a menu, therefore, is to add a Menu Strip control to the form. With your Visual Studio project loaded, and the Form to which you wish to add the menu selected, double click on the Menu Strip control in the Menus and Toolbars section of the Visual Studio Toolbox. You will notice that the Menu Strip object is added to the panel beneath the form, and that a Type Here field appears at the top of the form as follows: