If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) GetWindowRect_(WindowID(0),r.rect) ClipCursor_(r) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf