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

Using Input Boxes to Get Information from the User

Many times in a program, you need to get a single piece of information from the user. You might need the user to enter a name, the name of a file, or a number for various purposes. Although the message box lets your user make choices, it does not allow him to enter any information in response to the message. Therefore, you have to use some other means to get the information. Visual Basic provides a built-in dialog box for exactly this purpose: the input box.

The input box displays a prompt to tell the user what to enter, a text box where the user can enter the requested information, and two command buttons—OK and Cancel—that can be used to either accept or abort the input data. A typical input ...

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