EnableExplicit Define EventID Define POINT.POINT If OpenWindow(0,0,0,500,400,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) TextGadget(1,10,10,WindowWidth(0)-20,20,"Schreiben Sie was...",0) StringGadget(2,10,30,WindowWidth(0)-20,20,"",0) TextGadget(3,10,60,WindowWidth(0)-20,30,"Cursorposition X: "+Chr(13)+"Cursorposition Y: ",0) SetActiveGadget(2) Repeat EventID=WaitWindowEvent() If EventID=#PB_Event_Gadget Select EventGadget() Case 2 GetCaretPos_(POINT) SetGadgetText(3,"Cursorposition X: "+Str(POINT\x)+Chr(13)+"Cursorposition Y: "+Str(POINT\y)) EndSelect EndIf If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf