Properties are attributes that define the state, behavior, and appearance of a form or control. Most graphical controls expose properties so you can define the visual appearance, such as forecolor, backcolor, size, location, and font to use for displaying text. Controls and forms can also expose properties that specify how the control will interact with the user and the information the control needs to operate at run time.
Use the Properties window in the Forms Designer to view and set the properties that are available for a form or control while the form is being designed. Other properties may be available only at run time and can be accessed by code.
To set the properties of a form or control
For example, select forecolor to change the color of the control.
Depending on the property, you may be required to type a text or numerical value, select a value from a list of property values, or set the value in a custom editor. For information on the proper value type for the property, see the documentation for the property you are modifying.
A property can contain multiple subproperties that, when combined, define the value for the property. For example, the location property requires that you specify x and y values.
To set the value of a subproperty
While you are designing a form's user interface, you can specify the same property value for a group of controls of the same or similar type. For example, you can clear the value of the text property for all the Edit controls on a form.
Note If you select multiple controls that are not related, the Properties window displays only the properties that are common among all the selected controls.
To set the value of a property for multiple controls
The value is then set for the property for each control that you selected.
Some controls contain a large number of properties in the Properties window. This can make finding the property that you want to set difficult to find. You may also want to specify only certain categories of properties. Use the Properties window to view the properties for a form or control in a categorized view instead of an alphabetic view.
To view properties by category
The properties for the currently selected form or control will be separated into categories defined by the control.
Clicking the plus sign (+) next to the category name hides the category's properties. To return to the default alphabetic view, click the Alphabetic button in the Properties window.
Some controls require complex property settings, for example, setting the data bindings in the DataBinder control. These controls provide a custom dialog box called a property page to specify these complex property settings.
To use a control's property page
The property page for the control is displayed. If this button is disabled, the selected control does not have a property page.