Code: Select all
ExamineDesktops()
Global cp.point
Width.i = DesktopWidth(0)
Height.i = DesktopHeight(0)
hrgn1.i = CreateRectRgn_(0, height-1, 2*width, height)
hrgn2.i = CreateRectRgn_(width-1, 0 , width,(2* height)+1)
hrgn3.i = CreateRectRgn_(width-2, height-2 , width+2,height+2)
CombineRgn_(hrgn1,hrgn1, hrgn2,#RGN_OR)
CombineRgn_(hrgn1,hrgn1, hrgn3,#RGN_DIFF)
SetCursorPos_(width/2,height/2)
OpenWindow(0,-width,-height,2*Width, 2*Height,"",#PB_Window_BorderLess)
SetWindowColor(0,#Red)
SetWindowRgn_(WindowID(0),hrgn1,#True)
SetWindowPos_(WindowID(0),#HWND_TOPMOST,0,0,0,0,#SWP_NOSIZE)
Repeat
GetCursorPos_(cp)
ResizeWindow(0,(-width)+cp\x, (-height)+cp\y,#PB_Ignore, #PB_Ignore)
Until GetAsyncKeyState_(#VK_ESCAPE) & 1