If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ProgressBarGadget(1,400,3,100,16,0,100,0) SetGadgetState(1,50) CreateStatusBar(1,WindowID(0)) SetParent_(GadgetID(1),StatusBarID(1)) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf