Saves all or specified window definitions to a window file or memo field.
SAVE WINDOWS WindowNameList | ALL TO FileName | TO MEMO MemoFieldName
- Specifies one or more windows to be saved. Separate the window names with commas.
- Saves all window definitions to the window file or memo field.
- TO FileName
- Specifies the window file to which the window definitions are saved. If you don't specify an extension when naming the file, the default extension of .win is assigned. If you specify another extension when you save the window definitions to a file, you must include the extension when you restore the window definitions from the file.
- TO MEMO MemoFieldName
- Specifies the memo field to which the window definitions are saved. The table containing the memo field must be open; however, it does not have to be in the currently selected work area. To save window definitions to a table in another work area, include the table's alias when specifying the memo field.
Use RESTORE WINDOW to restore window definitions from a window file or memo field. The status of each window is also saved. For example, if a window is hidden when it is saved to a file or memo field, it remains hidden when it is restored.
In the following example, a window named
wOutput1 is created, and the window definition is saved to the file Temp.win. All windows are cleared and
wOutput1 is restored from the file and activated.
CLEAR DEFINE WINDOW wOutput1 FROM 2,1 TO 13,75 TITLE 'Output' ; CLOSE FLOAT GROW ZOOM ACTIVATE WINDOW wOutput1 @ 1,1 SAY 'This is the contents of the window' SAVE WINDOWS wOutput1 TO temp CLEAR WINDOWS WAIT WINDOW 'The window has been saved - Press a key' RESTORE WINDOW wOutput1 FROM temp ACTIVATE WINDOW wOutput1 WAIT WINDOW 'The window has been restored - Press a key' DEACTIVATE WINDOW wOutput1 RELEASE WINDOW wOutput1 DELETE FILE temp.win