Cicode Programming Reference > Cicode Function Categories > Window Functions > WinMove

WinMove

Moves the active window to a new location and sizes the window in a single operation. This is the same as calling the WinPos() and the WinSize() functions. You use PageInfo to get the current window position.

Notes

Syntax

WinMove(X, Y, Width, Height)

X, Y:

The new x and y pixel coordinates for the top-left corner of the active window.

If the window is a pinned window, the new coordinates will specify a location for the window that is based on the unscaled version of the page that hosts it.

Width:

The width of the window, in pixels.

If the target is a pinned window, the new width will be measured against the original window size as it is on the unscaled version of the page that hosts it.

Height:

The height of the window, in pixels.

If the target is a pinned window, the new height will be measured against the original window size as it is on the unscaled version of the page that hosts it.

Return Value

0 (zero) if successful, otherwise an error code is returned.

Related Functions

WinSize, WinPos, PageInfo

Example

WinMove(100,50,500,300);
/* Moves the top-left corner of the active window to the pixel coordinate 100,50 and size the window to 500 x 300 pixels. */

See Also

Window Functions

Published June 2018