Home > Language Reference > Windows Management Functions > RestoreWindow

RestoreWindow

The RestoreWindow function restores the specified window to its normal size.

Usage

Used to restore a window after it has been maximized or minimized.

Syntax

ret=RestoreWindow(<window_name>)

Parameters

<window_name>, string, window name  of the window to restore. You can truncate <window_name> to restore a window whose title starts with the specified characters.

Return value

ret, optional numeric return value. If the window has been successfully restored within 30 seconds (this default value can be changed using #ActionTimeout), the function returns 0. If the function fails, the return value is a nonzero value (see Window Functions Error Codes).

See also

SizeWindow

Example

'Launch notepad minimized
Shell("notepad",2)
'Restore notepad window to its standard size
RestoreWindow("NOTEPAD.EXE|Notepad|Untitled",1)