Chapter 9

Creating Menus

What You Will Learn in this Chapter

  • Creating menus
  • Creating submenus
  • Creating context menus

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=1118311813 on the Download Code tab. The code is in the 311813 C09.zip download and individually named according to the names given throughout the chapter.

Menus are a part of every good application and provide not only an easy way to navigate within an application but also useful tools for working with that application. Take, for example, Visual Studio 2012. It provides menus for navigating the various windows that it displays and useful tools for making the job of development easier through menus and context menus (also called pop-up menus) for cutting, copying, and pasting code. It also provides menu items for searching through code.

This chapter takes a look at creating menus in your Visual Basic 2012 applications. You explore how to create and manage menus and submenus and how to create context menus and override the default context menus. Visual Studio 2012 provides two menu controls in the Toolbox, and you will explore both of these.

Understanding Menu Features

The MenuStrip control in Visual Studio 2012 provides several key features. First and foremost, it provides a quick and easy way to add menus, menu items, and submenu items to your application. It also provides a built-in editor that enables you to add, edit, and delete ...

Get Beginning Visual Basic 2012 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.