Previous Document Next Document

Object Model Reference : Classes : C : Color : Methods : Color.UserAssignEx


Color.UserAssignEx

Function UserAssignEx() As Boolean

Description

Member of Color

The UserAssignEx method displays the Select Color dialog box, allowing the user to select a color. The chosen color is applied to the color object. UserAssignEx returns True if the color dialog was closed by clicking OK. It returns False if the dialog was canceled by pressing the Cancel or the Esc key.

A color is an effect applied to an object that alters the object’s appearance by the way it reflects light. A color model is a system that defines the number and type of colors that make up an image and that is used to organize and define colors according to a set of basic properties that can be reproduced. Black-and-white, grayscale, RGB, CMYK, and paletted are examples of popular color modes.

Parameter
Description
ParentWindowHandle
This parameter is optional, and its default value is 0.

VBA example

The following VBA example displays the Select Color dialog box. If the user does not select a color, the color is set to blue.

Sub Test()
 Dim cColor As New Color
 If cColor.UserAssignEx = False Then 'User closed the dialog without selecting a color
  Set cColor = CreateRGBColor(0, 0, 255)
 End If
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.