EnableExplicit Define EventID Define handle If OpenWindow(0,0,0,500,400,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) SpinGadget(1,10,10,100,20,0,100,#PB_Spin_Numeric|#PB_Spin_ReadOnly) SetGadgetState(1,50) handle = GetWindow_(GadgetID(1),#GW_HWNDNEXT) ShowWindow_(handle,#SW_HIDE) Repeat EventID=WaitWindowEvent() If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf