70 Part I Getting Started with Microsoft Visual Basic 2010
- Click the TextBox control on the Common Controls tab of the Toolbox.
- Draw a text box similar to this:
Text boxes are used to display text on a form or to get user input while a program
is running. How a text box works depends on how you set its properties and how you
reference the text box in the program code. In this program, a text box object will be used
to display the message “Hello, world!” when you click a button object on the form.
You’ll add a button to the form now.
- Click the Button control in the Toolbox.
- Draw a button below the text box on the form.
Your form looks something like this: