Command SAVE SCREEN Foundation

Saves the screen contents in a buffer or variable.

Syntax
SAVE SCREEN [TO <VarName>]
Parameters
<VarName>
SAVE SCREEN saves the current screen and optionally assigns it to the variable <VarName> as a character string. If the variable <VarName> does not exist, a PRIVATE variable is created. The character string contains the visible characters that make up the screen, as well as the applicable color attributes. The command saves only character based elements on the screen, not graphic elements.
Description

The command SAVE SCREEN saves a complete screen, which can be redisplayed using the command RESTORE SCREEN. Both commands exist only for compatibility reasons. The function SaveScreen() should be used instead of SAVE SCREEN. Instead of the command RESTORE SCREEN, the function RestScreen() should be used.

The option TO specifies a memory variable to which the character string representing the screen contents is assigned. When TO is not specified, the command SAVE SCREEN fills an internal screen buffer. SAVE SCREEN saves all visible characters together with their color attributes in a character string. Graphic elements are not saved. The visible characters on the screen are found at the odd places in the character string and the corresponding color attributes at the even places. A saved screen can be redisplayed using the command RESTORE SCREEN.

Examples
Save screen in text mode
// The example shows a typical use of SAVE SCREEN and 
// RESTORE SCREEN. The screen is saved before a display 
// and restored again after the display. Detailed examples 
// of saving and restoring the screen can be found with 
// the function SaveScreen(). 

PROCEDURE Main 
   LOCAL cScreen 

   SAVE SCREEN TO cScreen            // save screen 
   USE Customer NEW 

   DbEdit()                          // display data 

   RESTORE SCREEN FROM cScreen       // restore screen 
   USE 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.