EnableExplicit Define EventID If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) StringGadget(1, 10, 10, 100, 20, "", 0) SetGadgetText(1, "Ein langer Text wurde geschrieben.") SetActiveGadget(1) SendMessage_(GadgetID(1), #EM_SETSEL, $fffffff, $fffffff) Repeat EventID = WaitWindowEvent() If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf