# Function Reference

WinMove

Moves and/or resizes a window.

WinMove ( "title", "text", x, y [, width [, height]] )

Parameters

title | The title of the window to move/resize. See Title special definition.
text | The text of the window to move/resize.
x | X coordinate to move to.
y | Y coordinate to move to.
width | [optional] New width of the window.
height | [optional] New height of the window.

Return Value

Success: | Returns 1.
Failure: | Returns 0 if window is not found.

Remarks

WinMove has no effect on minimized windows, but WinMove works on hidden windows.
If the width and height are small (or negative), the window will go no smaller than 112 x 27 pixels. If width and height are large, the window will go no larger than approximately [12+@DesktopWidth] x [12+@DesktopHeight] pixels.
Negative values are allowed for the x and y coordinates. In fact, you can move a window off screen; and if the window's program is one that remembers its last window position, the window will appear in the corner (but fully on-screen) the next time you launch the program.
If multiple windows match the criteria, the most recently active window is used.
If x andy equal to the Default keyword no move occurs, just resizing.

Related

WinActivate, WinClose, WinGetClientSize, WinGetPos, WinSetState, Default

Example

WinMove("Untitled -", "", 0, 0, 200, 200)