Share via


Visual Basic: CommonDialog Control

Color Property

See Also   Example   Applies To

Returns or sets the selected color.

Syntax

object.Color [= number]

The Color property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
number A numeric expression that specifies the color.

Settings

The settings for number are:

Setting Description
Normal RGB colors Colors set with the RGB or QBColor functions in code.
System default colors Colors specified with the system color constants in the Visual Basic (VB) object library in the Object Browser.  The Microsoft Windows operating environment substitutes the user's choices, as specified by the user's Control Panel settings.

Remarks

For this property to return a color in a Color dialog box, the cdlCCRGBInitflag must be set. In the Font dialog box, the cdlCFEffects flag must be set.

Data Type

Long