If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) Repeat EventID=WaitWindowEvent() Select EventID Case #WM_LBUTTONDOWN SendMessage_(WindowID(0),#WM_NCLBUTTONDOWN, #HTCAPTION,0) EndSelect Until EventID = #PB_Event_CloseWindow EndIf