O'Reilly logo

Special Edition Using Microsoft® Visual Basic® .NET by Jeff Spotts, Brian Siler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controls for Making Choices

You have already learned how to acquire input from users through the use of a TextBox control. This approach works well for a number of data-gathering needs, but what if you just want a simple piece of information, such as “Do you own a car?” or “What is your marital status?” In these cases, the choice of answers you want to provide is limited to two or, at most, a few fixed choices. If you set up a text box to handle only the words yes and no, your program will have a problem if users type Maybe or Yeah, or if they misspell a word.

You can eliminate this problem, however, and make your programs easier to use by employing controls to display and accept choices. In the following sections, you will examine several controls ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required