Code: Select all
GetCursorPos_(mouse.POINT)
flags=#PB_Window_Invisible|#PB_Window_Tool|#PB_Window_SizeGadget ; Must be these only.
hWnd=OpenWindow(0,0,0,100,50,"test",flags)
GetClientRect_(hWnd,inner.RECT)
GetWindowRect_(hWnd,outer.RECT)
x=((outer\left-inner\left)-(inner\left-outer\left))+(GetSystemMetrics_(#SM_CXSIZEFRAME)*2)+2
y=((outer\bottom-outer\top)-(inner\bottom-inner\top))-GetSystemMetrics_(#SM_CYSIZEFRAME)
SetWindowPos_(hWnd,#HWND_TOP,mouse\x-x,mouse\y-y,0,0,#SWP_NOSIZE|#SWP_SHOWWINDOW)
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow