Previous Document Next Document

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


Color.UserAssign

Sub UserAssign([ParentWindowHandle As Long])

Description

Member of Color

The UserAssign method displays the Color dialog box, allowing the user to assign a color. The chosen color is applied to the color object.

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 creates a new color object, then shows the color dialog and prompts the user to select a color. The color is then applied to all of the object fills in the selection.

Sub Test()
 Dim c As New color
 Dim s As Shape
 c.UserAssign
 For Each s In ActiveSelection.Shapes
  s.Fill.ApplyUniformFill c
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.