Example of Intercepting WM_MOVING to restrict area the window can be moved to
;Autoit v3.3.14.5 Limit Form Move Example-- Bilgus 2018
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPISysWin.au3> ;_WinAPI_DefWindowProc()
Global $g_hGUI, $g_idLimit
Global $g_aWindowLimits = [15, 10, @DesktopWidth / 2, @DesktopHeight / 2] ; Min X, Min Y, Max X, Max Y
GUIRegisterMsg($WM_MOVING, WM_MOVING) ;Registe