xHarbour Reference Documentation > Function Reference |
Saves a rectangular screen region for later display.
SaveScreen( [<nTop>], [<nLeft>], [<nBottom>], [<nRight>] ) --> cScreen
The function returns a character string holding textual and color information of the saved screen rectangle.
SaveScreen() is used to save the current display in a console window. The function combines textual and color information in the returned string. This string can later be displayed using the RestScreen() function.
Note: textual information on screen is placed at odd positions in the return string, while color attributes for each character are stored at even positions in the SaveScreen() string.
See also: | RestScreen() |
Category: | Screen functions |
Source: | rtl\saverest.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example saves a screen region, changes the display of that // region, and restores it to its original state. PROCEDURE Main LOCAL nTop:=0, nLeft:=0, nBottom:=10, nRight:=40, cScreen cScreen := SaveScreen( nTop, nLeft, nBottom, nRight ) SET COLOR TO "W+/B" DispBox( nTop, nLeft, nBottom, nRight ) WAIT "Press a key..." RestScreen( nTop, nLeft, nBottom, nRight, cScreen ) WAIT "Screen is restored Press a key..." RETURN
http://www.xHarbour.com