| 1. |
Create a solution and project with the name Color. |
| 2. |
Design the GUI according to the GUI standards. |
|
 |
| 3. |
Code the BlueButton control's Click event procedure so
that it sets the BackColor property of each label control to
Color.Blue. Use the For...Next statement and the Controls
collection. |
| 4. |
Code the YellowButton control's Click event procedure so
that it sets the BackColor property of each label control to
Color.Yellow. Use the Do...Loop statements and the Controls
collection. |
| 5. |
Code the RedButton control's Click event procedure so that
it creates a collection and assigns each label control to the
collection. Set the BackColor property of each control in the
collection to Color.Red. Use the For...Each Next statement. |
| 6. |
Code the ExitButton. |
| 7. |
Save the project and test it. |
| 8. |
When you click the Blue, Yellow or Red button all four
labels' background color should change to blue, yellow or red
respectively. |