HotkeyNet: the next generation

Sets the position and size of a window.


SetWindowPositionAndSize ( window, x, y, width, height, repaint )


Window is the name or handle of a window.

X and Y are the screen coordinates of the window's upper left corner.

Width is the width of the window in pixels.

Height is the height of the window in pixels.

Repaint can be be the word "true" or "false." If true, the window gets repainted after the change. This parameter is optional. The default is "true."

Return value

Returns true if the operation succeeds, false if it fails.


Window names are case sensitive because the operating system works that way.

Partial name matches are enabled by default. There will be a setting to require full name matches.

Calls the operating system function MoveWindow.


function demo()
   SetWindowPositionAndSize ( "World of Warcraft", 0, 0, 800, 600 );

This page was last revised on May 22, 2009
Copyright © 2009 HotkeyNet Software