Datasheet
Figure 1-11
Try It Out Adding Controls to the HelloUser Application
1.
Stop the project if it is still running, because you now want to add some controls to your form.
The simplest way to stop your project is to click the _ button in the top-right corner of the form.
Alternatively, you can click the blue square in the IDE (which displays a ToolTip that says “Stop
Debugging” if you hover over it with your mouse pointer).
2. Add a Label control to the form. Click Label in the Toolbox and drag it over the form’s Designer
and drop it in the desired location. (You can also place controls on your form by double-clicking
on the required control in the Toolbox or clicking on the control in the Toolbox and then draw-
ing it on the form.)
3. If the Label control you have just drawn is not in the desired location, it really isn’t a problem.
Once the control is on the form, you can resize it or move it around. Figure 1-12 shows what the
control looks like after you place it on the form. To move it, click the dotted border and drag it
to the desired location. The label will automatically resize itself to fit the text that you enter in
the Text property.
4. After drawing a control on the form, you should at least configure its name and the text that it
will display. You will see that the Properties window to the right of the Designer has changed
to
Label1, telling you that you are currently examining the properties for it. In the Properties
14
Chapter 1
04_574019 ch01.qxd 9/16/05 9:43 PM Page 14