Displays the Windows Color dialog box and returns the color number of the chosen color.
GETCOLOR([nDefaultColorNumber]) |
Parameters
- nDefaultColorNumber
- 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
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.
Example
The following example displays the Windows Color dialog box with the color red selected. A number corresponding to the color you choose is displayed when you exit the dialog box.
В | Copy Code |
---|---|
CLEAR ? GETCOLOR(255) |