O'Reilly logo

Visual Basic® .NET Database Programming by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Menu Commands

Program EasyDraw’s File menu contains six commands besides the MRU list: New, Open, Save, Save As, Close, and Exit. The code shown in Listing 9.4 manages these functions.

Subroutine FileIsLoaded sets the program’s controls to an appropriate state depending on whether a drawing is loaded. If no drawing is loaded, the subroutine disables the File menu’s Close, Save, and Save As commands. It also makes the toolbar and drawing area invisible. If a drawing is loaded, the subroutine enables the File menu’s commands and makes the toolbar and drawing area visible.

When the user selects the File menu’s New command, the mnuFileNew_Click event handler executes. It calls DataSafe to see if it safe to discard the current data and exits if ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required