For this you must probably use subclassing with help of callbacks. Here is example from Callback UDF: http://www.autoitscript.com/forum/index.php?showtopic=50768 #include <GUIConstantsEx.au3> #include "DllCallBack.au3" ; some windows constants Global Const $WM_RBUTTONDOWN = 0x0204 Global Const $WM_RBUTTONUP = 0x0205 Global Const $WM_RBUTTONDBLCLK = 0x0206 Global Const $WM_MOUSEMOVE = 0x0200 Global $pOriginalWindowProc, $sDbg, $hCtrl_Edit, $nMoveTimer, $fMoveSet = False ; Create a