Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

 

Home ] Up ]


 

Color Program

 

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.

 


All content on this site is free for private use only  |  Contributions are encouraged  |  Thank you to Netfirms for the free hosting  |  If copyright content is published here or links to certain content violates some right/law, contact the Webmaster to have it removed immediately.

 

Site launched: October 2005  |  Updated: July 20, 2006  |  Link exchange  |  Site map  |  Contact us