Chapter 7, Programming Problem #3

You can add menus like real Windows programs with File, Exit, Help, and About.

Part 1 of the assignment, Add a menu to your form by doing this:

  1. Open up one of your recent Windows programs that you worked on earlier in Chapter 7, or make a new program.
  2. Double click on MainMenu in the toolbar.
  3. Select MainMenu by clicking on it below your program.
  4. Where it says “Type Here” double click and type &File (the & makes the underline under File that can be used as a shortcut if the user presses the Alt key.
  5. Double click on the line below, and put a hyphen. That will create a line on the menu.
  6. Double click on the type here line below the hypen, and put “End”.
  7. Click on File, double click on Exit, then type “End” in the code.
  8. Put in a &Help and an &About below the Help, to the right of the File.
  9. Double click the About and create a messagebox that has the name of the program, date, and your name.

Part 2 of the assignment, Add a right click menu to your form by doing this:

  1. Add a context menu by double clicking context menu on the toolbar
  2. Select context menu, and add three names to the menu like you did in Part 1.
  3. Double click on each item, and put a command in the code for the item. You can call items you made for the first menu by typing the name of the item and a period, then performclick.
  4. Select the form, the contextmenu property, then chose the context menu you just created.
  5. Run the program, you should be able to right click and make something happen.

Show me the program with the working menus when you are finished.