If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ButtonGadget(1,10,10,100,20,"Verstecken",0) Repeat EventID=WaitWindowEvent() If EventID=#PB_Event_Gadget Select EventGadget() Case 1 ShowWindow_(WindowID(0),#SW_HIDE) Delay(1000) ShowWindow_(WindowID(0),#SW_SHOW) EndSelect EndIf Until EventID = #PB_Event_CloseWindow EndIf