Futurebasic/Language/Reference/long color
LONG COLOR
editSyntax
editLONG COLOR bluePart,greenPart,redPart [,foregroundFlag]
Description
editSets the foreground color or background color for the current output window. Each of the three color components can range from 0 (darkest) to 65535 (lightest), and they combine to make any conceivable shade. If you set foregroundFlag
to _zTrue
, or omit the parameter, then LONG COLOR
sets the foreground color. If you set foregroundFlag
to _false
, then LONG COLOR
sets the background color.
Example:
CD Example: LONGCOLOR.BAS
FB Lite behavior:
When you use the "FB Lite" runtime, LONG COLOR
switches to the Graphics Window before executing; you can't use it to change the color in the Text Window nor on the printer. To change the color of printed output while running FB Lite, use the Toolbox procedure RGBFORECOLOR.
Note:
LONG COLOR
does not immediately change the appearance of the window. If you set the foreground color, the new color will appear the next time you draw text or a QuickDraw shape (it won't affect the color of anything that's already drawn). If you set the background color, the new color will appear the next time you erase all or part of the window (for example, with the CLS
statement).
You can use the Toolbox procedures GetForeColor and GetBackColor to find out the current foreground or background color for the current window.
See Also
editCOLOR; PEN