Dialog_ChooseColor

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > Common Dialogs >

Dialog_ChooseColor

 

Description

 

Open common color selection file dialog.

 

Syntax

 

lColor = Dialog_ChooseColor [ (hwnd [, DefaultColor [, Flags] ] ) ]

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

hwnd

Number

Yes

Handle of the dialog containing the control

DefaultColor

Number

Yes

Default initial color selected by the dialog

Flags

Number

Yes

Additional flags used to change color dialog behave

 

Remarks

 

If return color value is -1 it means user has cancel the dialog.

 

Restrictions

 

See also

 

Examples

 

USES "UI"

 

DIM lColor AS LONG

 

lColor = Dialog_ChooseColor(0, RGB(255, 0, 0), %CC_RGBINIT OR %CC_FULLOPEN )

 

IF lColor = -1 THEN

MSGBOX 0, "Color Dialog cancel by user"

ELSE

MSGBOX 0, "Your color is: " & HEX$(lCOlor, 6)

END IF