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:
- Open up one of your recent Windows programs that you worked on earlier in Chapter 7, or make a new program.
- Double click on MainMenu in the toolbar.
- Select MainMenu by clicking on it below your program.
- 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.
- Double click on the line below, and put a hyphen. That will create a line on the menu.
- Double click on the type here line below the hypen, and put “End”.
- Click on File, double click on Exit, then type “End” in the code.
- Put in a &Help and an &About below the Help, to the right of the File.
- 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:
- Add a context menu by double clicking context menu on the toolbar
- Select context menu, and add three names to the menu like you did in Part 1.
- 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.
- Select the form, the contextmenu property, then chose the context menu you just created.
- 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.