SubstituteColor Property

Measurement Studio User Interface

SubstituteColor Property

Syntax

CWImage.SubstituteColor

Data Type

Color

Purpose

Specifies the color that will replace a specified color in the metafile image.

Remarks

Use the Color property to specify the color in the metafile image that you want to replace. Use the SubstituteColor property to specify the color that will replace Color. Use the Tolerance property to specify the percentage at which you want the color matched.

Example

'Load the metafile into the OffImage of the CWButton
Set CWButton1.OffImage.CWImage.Picture = LoadPicture("c:\pics\stop.wmf")

'Replace all red in image with blue
CWButton1.OffImage.CWImage.Substitute = True
CWButton1.OffImage.CWImage.Color = vbRed
CWButton1.OffImage.CWImage.SubstituteColor = vbBlue
'Substitute only very close hue matches
CWButton1.OffImage.CWImage.Tolerance = 10

See Also

Substitute

Color

Tolerance