
Ross Sheppard High School
Computer Programming 20
Student Learning Guide
The Colours Program
| When you have finished this project, you will be able to: | |
| create a menu | |
| use labels | |
| use Visual Basic colors | |
|
describe the following terms:
|

The Colors Program
When the user selects a color from the menu choices, the background color of the form will turn the selected color.
When a color choice is selected, that choice on the menu will be disabled (dimmed). The color the user selected
will be confirmed in the label. When the user clicks on the Exit button, a confirmation dialog box appears. Based
on the user's selection, the program unloads the form and quits or returns the user to the program. When the user
chooses Exit from the File menu, a confirmation dialog box appears. Based on the user's selection, the program
unloads the form and quits or returns the user to the program.
| Object | Property | Setting |
| Form | Name | frmColors |
| Caption | The Colors Program | |
| BackColor | White | |
| StartUpPosition | 2-ScreenCenter | |
| CommandButton | Name | btnExit |
| Caption | Exit | |
| Font | MS Sans Serif Bold 14 | |
| Label | Name | lblColor |
| Caption | Make it blank | |
| Font | MS Sans Serif Bold 12 | |
| BackColor | White |













| Color | QBColor Number |
| Blue | QBColor(1) |
| Green | QBColor(2) |
| Red | QBColor(4) |
| White | QBColor(15) |
| Caption | Name | Properties |
| &File | mnuFile | Menu Bar |
| &Red | mnuRed | Sub-menu |
| &Blue | mnuBlue | Sub-menu |
| &Green | mnuGreen | Sub-menu |
| &White | mnuWhite | Sub-menu Disabled on program start |
| - | mnuSep1 | Sub-menu |
| E&xit | mnuExit | Sub-menu Runs confirmation dialog box |
| &About | mnuAbout | Menu Bar |