次の方法で共有


SysColorCtrl.GetDerivedRGB method

The GetDerivedRGB method derives a color based on a starting color, a color to move toward, and a percentage to move toward that color. It is returned as an RGB value.

Syntax

SysColorCtrl.GetDerivedRGB( _
  ByVal pszFrom, _
  ByVal pszTo, _
  ByVal pszFormat, _
  ByVal nPercent _
)

Parameters

pszFrom [in]

A string that contains the color you want to use as the starting color. The contents of the string depend on the format specified in the pszFormat parameter.

pszTo [in]

A string that contains the color to move toward.

pszFormat [in]

A string that contains the name of the format that is being passed in the pszFrom and pszTo parameters.

CSS

Name of the display element whose color you want to specify. See System Color Values for Color Derivation Methods.

HEX

Hexadecimal form of the color. For example, specify FFFFFF for white.

RGB

RGB form of the color. For example, specify 16777215 for white.

nPercent [in]

An integer that represents the percentage (0 to 100) between the pszFrom and pszTo colors. This value represents what percentage of the pszTo color should be blended with the pszFrom color. For example, a value of 0 would return the pszFrom color, a value of 50 would return a color that was halfway between pszFrom and pszTo, and a value of 100 would return the pszTo color. This value must be between 0 and 100.

Return value

An integer that is the RGB value for the derived color specified by the method's parameters.

Requirements

Redistributable
MMC 1.1 or later
DLL
Cic.dll