xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

InvertWin()

Exchanges the foreground and background color on the screen.

Syntax

InvertWin( [<nTop>]   , ;
           [<nLeft>]  , ;
           [<nBottom>], ;
           [<nRight>]   ) --> 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>
Numeric value indicating the bottom row screen coordinate. It defaults to MaxRow().
<nRight>
Numeric value indicating the right column screen coordinate. It defaults to MaxCol().

Return

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

Info

See also:InvertAttr(), SetColor()
Category: CT:Video , Screen functions
Source:ct\invrtwin.prg
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example produces a blink effect by inverting
// color attributes in a rectangular area on the screen.

   #include "Box.ch"

   PROCEDURE Main
      SET COLOR TO W+/B
      CLS

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

      @ Row(), Col() SAY "Blink effect for 1 second press a key"
      Inkey(0)

      WaitPeriod( 100 )

      DO WHILE WaitPeriod()
         InvertWin1( 20, 5, 5, 75 )
         Inkey(.1)
      ENDDO
   RETURN

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