EnableExplicit Define EventID Procedure Window1() If OpenWindow(1,0,0,300,200,"Window",#PB_Window_SystemMenu|#PB_Window_WindowCentered|#PB_Window_Invisible,WindowID(0)) ShowWindow_(WindowID(1),#SW_SHOWNOACTIVATE) EndIf EndProcedure If OpenWindow(0,0,0,500,400,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ButtonGadget(1,10,10,WindowWidth(0)-20,50,"Neues Fenster öffnen, ohne eigenen Fokus zu verlieren",0) Repeat EventID=WaitWindowEvent() If EventID=#PB_Event_Gadget Select EventGadget() Case 1 Window1() EndSelect EndIf If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf