GETCOLOR( ) Function
Displays the Windows Color dialog box and returns the color number of the chosen color.
GETCOLOR([nDefaultColorNumber])
Numeric
- 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.
GETCOLOR( ) returns – 1 if you exit the Color dialog box by pressing ESC, choosing the Cancel button, or choosing Close from the Control menu.
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.
CLEAR
? GETCOLOR(255)