EnableExplicit Structure LASTINPUTINFO cbSize.l dwTime.l EndStructure Procedure Thread(z) Protected PLASTINPUTINFO.LASTINPUTINFO PLASTINPUTINFO.LASTINPUTINFO PLASTINPUTINFO\cbSize = SizeOf(PLASTINPUTINFO) Repeat GetLastInputInfo_(@PLASTINPUTINFO) AddGadgetItem(1,0,Str(PLASTINPUTINFO\dwTime),0,0) Delay(100) ForEver EndProcedure If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ListViewGadget(1,10,10,480,230,0) CreateThread(@Thread(),0) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf