16 Part I Getting Started with Microsoft Visual Basic 2010
Now change a property setting for the Label2 object (the label that contains the text
“The Bass Guitar”).
- In the Designer, click the second label object (Label2).
When you select the object, resize handles surround it.
- Click the Font property in the Properties window.
The Label2 object has its own unique set of property settings. Although the property
names are the same as those of the Label1 object, the values in the property settings
are distinct and allow the Label2 object to act independently on the form.
- Click the Font ellipsis button, set the font style to Bold and the font size to 12 points,
and then click OK. - Scroll to the ForeColor property in the Properties window, and then click it in the left
column. - Click the ForeColor arrow in the right column, click the Custom tab, and then click
a dark purple color.
The text in the Label2 object is now bold and purple on the form, as shown here.
Congratulations! You’ve just learned how to set properties in a Visual Basic program by using
the Visual Studio Properties window—one of the important skills in becoming a Visual Basic
programmer.