Setting Colors

See Also109RZEV

You can set background and foreground colors for forms and controls using the Color palette11468R9.

To set colors with the Color palette

   1. From the Window menu, choose Color Palette.

     The box on the left side of the palette displays the currently selected colorsthe foreground color in the inner box and the background color in the outer box.

   2. Select the form or control whose color you want to change.

   3. To change the foreground color for the selected object, click the inner box, then click a color on the color box; to change the background color for the selected object, click the outer box, then click a color on the color box.

To set colors in the Properties window

   1. From the Properties windowO00AW8, select the color property you want to set either by clicking the property name in the Property list or by pressing Ctrl+Shift+ the first letter of the property name you want to select.

     Visual Basic displays the current color setting in the Settings boxAV4YN4, and the down arrow to the right of the Settings box changes into a button with three dots51NRBM.

   2. Click the button with three dots or double-click the color property name.

   3. Click the color you want from the available choices.

 

Note   You can set normal RGB colors with the BackColor1W9T6JQ and ForeColor1W9T6JQ properties or in code using the RGBLANRGB or QBColorNYS7SU functions in code.

If you specify colors using the system color constantsTD9WSV from the CONSTANT.TXT file, Visual Basic substitutes the color-scheme choices the user has made in the Control Panel56C790N settings.

 


See Also

Help:

Creating Custom ColorsCJ5GBZ