EnableExplicit If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) SpinGadget(1,10,10,100,20,0,100,0) InvalidateRect_(GadgetID(1),0,#True) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf