xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

RestScreen()

Displays a SaveScreen() string.

Syntax

RestScreen( [<nTop>]   , ;
            [<nLeft>]  , ;
            [<nBottom>], ;
            [<nRight>] , ;
            <cScreen>    ) --> NIL

Arguments

<nTop>
A numeric value indicating the screen coordinate for the top row of the rectangle to display the SaveScreen() string. The default value is 0.
<nLeft>
A numeric values indicating the screen coordinate for the left column of the rectangle to display the SaveScreen() string. The default value is 0.
<nBottom>
A numeric value indicating the screen coordinate for the bottom row of the rectangle to display the SaveScreen() string. The default value is MaxRow().
<nRight>
A numeric values indicating the screen coordinate for the right column of the rectangle to display the SaveScreen() string. The default value is MaxCol().
<cScreen>
A character string previously returned from function SaveScreen().

Return

The function returns NIL.

Description

RestScreen() displays the contents of a console window previously saved with the SaveScreen() function. The coordinates <nTop>, <nLeft>, <nBottom> and <nRight> do not necessarily have to be the same coordinates used with SaveScreen(). They must, however, describe a rectangular area of the exact same size. If the rectangle defined for SaveScreen() differs from the rectangle defined for RestScreen(), the result of RestSCreen() is unpredictable.

Info

See also:DispBegin(), SaveScreen()
Category: Screen functions
Source:rtl\saverest.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays a frame moving diagonal in a console window.
// The SaveScreen() string is created only once, while the frame is
// displayed and erased at different screen coordinates.

   PROCEDURE Main
      LOCAL nTop:=1, nLeft:=1, nBottom:=10, nRight:=40, cScreen, i

      CLS
      cScreen := SaveScreen( nTop, nLeft, nBottom, nRight )

      FOR i:=1 TO 20
         DispBox( nTop, nLeft, nBottom, nRight, 2, "W+/B" )

         RestScreen( nTop, nLeft, nBottom, nRight, cScreen )
         Inkey(0.2)
         nTop ++
         nLeft ++
         nBottom ++
         nRight ++
      NEXT

   RETURN

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