Click or drag to resize

GetColor Function

X#
Displays the Windows Color dialog box and returns the color number of the chosen color.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION GetColor(
	nDefaultColorNumber
) AS LONG CLIPPER
Request Example View Source

Parameters

nDefaultColorNumber (Optional)
Type: Usual
Specifies the color that is initially selected when the Color dialog box is displayed. If nDefaultColorNumber doesn't correspond to a color in the Color dialog box, the first color in the Color dialog box is selected. If you omit nDefaultColorNumber, black is selected.

Return Value

Type: Long
Numeric
Remarks
GetColor( ) returns – 1 if you exit the Color dialog box by pressing Esc, choosing the Cancel button, or choosing Close from the Control menu.
Examples
X#
1Clear
2? GetColor(255)
See Also