Procedure Thread(dummy) Repeat GetCursorPos_(Coords.POINT) SetGadgetText(1,"Mausposition: x="+Str(Coords\x)+" y="+Str(Coords\y)) Delay(10) ForEver EndProcedure If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) TextGadget(1,10,10,200,20,"",0) CreateThread(@Thread(),0) Repeat Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf