xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

ColorWin()

Replaces a color attribute in a screen region.

Syntax

ColorWin( [<nTop>]     , ;
          [<nLeft>]    , ;
          [<nBottom>]  , ;
          [<nRight>]   , ;
          [<xNewColor>], ;
          [<xOldColor>]  ) --> cNull

Arguments

<nTop> and <nLeft>
Numeric values indicating the screen coordinates for the upper left corner of the screen area. The default value for both parameters is zero.
<nBottom> and <nRight>
Numeric values indicating the screen coordinates for the lower right corner of the screen area. The default value for both parameters is determined by MaxRow() and MaxCol().
<xNewColor>
This is either a single color value (see SetColor()), or its numeric color attribute (see ColorToN()). It defines the new color and defaults to the return value of GetClearA().
<xOldColor>
Either a single color value or its numeric color attribute to be replaced can be specified. If omitted, all colors are replaced with <xNewColor>.

Return

The return value is always a null string ("").

Info

See also:ColorRepl(), ColorToN()
Category: CT:Video , Screen functions
Source:ct\screen3.prg
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays a box and changes its color.

   #include "Box.ch"

   PROCEDURE Main
      SET COLOR TO N/B
      CLS

      DispBox( 5, 5, 20, 75, B_SINGLE+ " ", "W+/R" )
      WAIT

      ColorWin( 20, 5, 5, 75, "N/BG" )
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe