#include <GuiConstants.au3> $my_gui = GUICreate("MyGUI", 392, 323) _GuiHole($my_gui, 80, 30, 200) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Func _GuiHole($h_win, $i_x, $i_y, $i_size) Dim $pos, $outer_rgn, $inner_rgn, $wh, $combined_rgn, $ret $pos = WinGetPos($h_win) $outer_rgn = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", $pos[2], "long", $pos[