Sams Teach Yourself Visual Basic 6 in 24 Hours

Sams Teach Yourself Visual Basic 6 in 24 Hours

By Greg Perry

The Color Dialog Box

To display a Color dialog box, you only need to change the DialogTitle property and issue the correct method, like this:

cdbDialog.DialogTitle = "Select a Color"
cdbDialog.ShowColor     'Display the dialog box

The dialog box's Color property will hold the selected color when the user closes the dialog box and your code regains control. You can assign this Color property to other Visual Basic properties that require color values.

Share ThisShare This

Informit Network