How to Convert a RGBCOMP() Value into Component ValuesLast reviewed: April 10, 1996Article ID: Q149184 |
The information in this article applies to:
SUMMARYThe RGBCOMP() function is new to Foxtools.fll. It accepts an RGB composite value as an argument and converts it to the three component values for you. In effect, it is the counterpart to FoxPro's RGB() function.
MORE INFORMATIONRGBComp() returns the Red, Green, and Blue components of a composite RGB color value. The syntax is:
RGBComp( nRGBColor, @nRedVal, @nGreenVal, @nBlueVal )Parameters:
Sample CodeThe following code gives an example implementation: *-- Set up to use FoxTools.FLL CLEAR SET LIBRARY TO SYS(2004) + '\FOXTOOLS'*-- Declare some variables to be used in the function calls nRedVal = 0 nBlueVal = 0 nGreenVal = 0*-- Display as we go. ? RGBCOMP(65537, @nRedVal, @nGreenVal, @nBlueVal) ? nRedVal, nGreenVal, nBlueVal = RGBCOMP(65537 + 44 + 256 * 4, @nRedVal, @nGreenVal, @nBlueVal) ? nRedVal, nGreenVal, nBlueVal = RGBCOMP(65537 + 86 + 256 * 4, @nRedVal, @nGreenVal, @nBlueVal) ? nRedVal, nGreenVal, nBlueVal*-- Reset the current active library. SET LIBRARY TO |
Additional reference words: 3.00 3.00b VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |