Database Reference
In-Depth Information
2. Drag a Label control onto the form, and position it at the top middle of the
form. Select this label, navigate to the Properties window, and set the following
properties:
a. Set the Name property to lblWelcome.
b. Set the Text property to Welcome.
c. Select the Font property, click the ellipsis button, and specify the size of the Label
control as 16 points in the Size drop-down list.
d. Set the TextAlign property to TopCenter.
Tip You can also double-click any control in the Toolbox to add it to the form. The difference between dragging
a control and double-clicking is that while dragging, you can position the control as you desire on the form. But if
you just double-click a control, it will be added to the top-left corner; therefore, if you prefer it in a different
location, you still have to drag it there.
3. Drag two more Label controls onto the form, and put them below the
“Welcome” text, a little toward the left of the form. Select the first label,
navigate to the Properties window, and set the Name property to lblFirstName
and the Text property to First Name.
4. Now select the second label, navigate to the Properties window, and set its
Name property to lblLastName and its Text property to Last Name.
5. Drag two TextBox controls onto the form, and put the TextBox named textBox1
in front of the First Name label and the TextBox named textBox2 in front of the
Last Name label.
6. Select textBox1, go to the Properties window, and set its Name property to
txtFname. Select textBox2, and in the Properties window set its Name property
to txtLname.
7. Drag a Button control onto the form, and place it below the Label and TextBox
controls. Select the Button control, go to the Properties window, change the
Name property to btnSubmit, and then set its Text property to Submit.
Now you have your GUI design of the application ready; it should resemble the form shown in
Figure 9-8.
 
Search WWH ::




Custom Search