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

 

Home ] Up ] Memo ]


 

Ten to Twenty Program

 

1.

Create a new blank solution and name it TentoTwenty Solution.

2.

Create a new blank project and name it TentoTwenty Project.

3. Add a label control to the form and name it idValueLabel.
4. Add a textbox control to the form and name it ValueTextBox
5. Add a button control to the form and name it EnterButton.
6. Add a button control to the form and name it ExitButton.
7. Program the EnterButton to do the following:
7.1 Use an If statement to check whether the value entered in the ValueTextBox control is between 10 and 20.
7.2 If the value entered is between 10 and 20, use a MessageBox to display the following message:  "Thank you, your amount of [insert the amount] was accepted".
7.3 If the value is not between 10 and 20, use a MessageBox to display the following message:  "Invalid value.  Please try again."
7.3.1 Return the user to the ValueTextBox and erase the invalid data that the user entered.
8. Code the ExitButton to close the form.
9. Test your program with the following individual values:  8, 15, 20, 35
10. Your GUI should look like this:

 

Back to Top


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