Controls in Visual Basic

Ambient Properties

When a control is added to the form it will have the same Font (including font size) and ForeColor as the form or container it is placed in (usually the form.) These are called the ambient properties. Before adding controls, set the Font and ForeColor for the form to the color, font and size that you want all of the controls to have. This will give the Form a uniform look without having to change the properties of each form individually.

In this example the Background of the form was changed to light yellow, the ForeColor was changed to green, and the font was changed to "AR Julian" 12 point size before the controls were added. These ambient properties of the form were then used for the controls as they were added. Of course, you could change them to something else, but it is usually better to have a uniform look to the form.


NEXT: Adding Pictures with PictureBox