Datasheet

window, set your new label’s Text property to Enter Your Name. Notice that, once you press
enter or click off of the property, the label on the form has automatically resized itself to fit the
Text property. Now set the Name property to lblName.
Figure 1-12
5. Now, directly beneath the label, you want to add a text box, so that you can enter a name. You
are going to repeat the procedure you followed for adding the label, but this time make sure
you select the TextBox control from the toolbar. After you have dragged-and-dropped (or
double-clicked) the control into the appropriate position as shown in Figure 1-13, use the
Properties window to set its Name property to txtName.
Notice the sizing handles on the left and right side of the control. You can use these handles to resize the
text box horizontally.
Figure 1-13
6. In the bottom left corner of the form, add a Button control in exactly the same manner as you
added the label and text box. Set its Name property to btnOK and its Text property to &OK.
Your form should now look similar to the one shown in Figure 1-14.
15
Welcome to Visual Basic 2005
04_574019 ch01.qxd 9/16/05 9:43 PM Page 15