DisabledBackColor, DisabledForeColor Properties
Collapse the table of content
Expand the table of content

DisabledBackColor, DisabledForeColor Properties

Visual Studio .NET 2003

Specifies the background and foreground colors for a disabled control. Read/write at design time and run time.

Control.DisabledBackColor[ = nColor]


Control.DisabledBackColor = RGB(nRedValue, nGreenValue, nBlueValue)
Control.DisabledForeColor[ = nColor]


Control.DisabledForeColor = RGB(nRedValue, nGreenValue, nBlueValue)

Property Values

Specifies a single number to represent the color.
nRedValue, nGreenValue, nBlueValue
Specifies three separate color intensities that compose the control's foreground color or background color. You must use the RGB( ) function with these values to consolidate the three color components into one number.


The color you specify is dithered with gray.

Note   In the Properties window, you can double-click any of the color properties to display the Color dialog box. You can choose or define colors from this dialog box. The red, green, and blue intensities that correspond to the color you choose become the settings for these properties after you close the Color dialog box.

The color settings, or Themes, of the operating system set the default color settings for the DisabledBackColor and DisabledForeColor properties.

If the Themes property is set to True (.T.), setting the DisabledBackColor property value produces a 35% transparency overlay on top of the themed button. This produces a colorizing effect.

See Also

BackColor, ForeColor Properties

Applies To: CheckBox | ComboBox | CommandButton | EditBox | Label | ListBox | OptionButton | Spinner | TextBox

© 2016 Microsoft