| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Displays a SaveScreen() string.
RestScreen( [<nTop>] , ;
[<nLeft>] , ;
[<nBottom>], ;
[<nRight>] , ;
<cScreen> ) --> NIL
The function returns NIL.
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.
| See also: | DispBegin(), SaveScreen() |
| Category: | Screen functions |
| Source: | rtl\saverest.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// 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
http://www.xHarbour.com