Function Repository Resource:

Win32MoveWindow

Source Notebook

Move a window on a Windows machine

Contributed by: Daniel Bigham

ResourceFunction["Win32MoveWindow"][hwnd,{x,y}]

moves a window to the given coordinates.

ResourceFunction["Win32MoveWindow"][func,{x,y}]

finds the window for which the given function returns True when passed the window’s title and moves it to the given coordinates.

Details and Options

ResourceFunction["Win32MoveWindow"] is only supported on Windows machines.
Window coordinates are relative to the top-left corner of the leftmost screen.

Examples

Basic Examples (1) 

Move the Messages window to the top-left corner of the leftmost screen:

In[1]:=
ResourceFunction["Win32MoveWindow"][
 StringStartsQ["Messages - "], {0, 0}]

Possible Issues (1) 

Win32MoveWindow is only supported on Windows operating systems:

In[2]:=
ResourceFunction["Win32MoveWindow"][]
Out[2]=
In[3]:=
$OperatingSystem
Out[3]=

Publisher

Daniel Bigham

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.0.0 – 20 March 2019

Related Resources

License Information