Try _Screen.RemoveObject("AselobjTimer1") Catch Endtry _Screen.AddObject("AselobjTimer1","AselobjTimer") Define Class AselobjTimer As Timer Interval = 250 Procedure Init() Clear * maintain a collection of the created eventhandlers with * the cDesignTimeIDs of the event source objects as key. This.AddProperty("oEventhandlers",Createobject("Collection")) Endproc Procedure Timer() * observe Aselobj Private paObjects Release paObjects =Aselobj(paObjects,1) Activate Screen Local loObject, loEventhandler, lnCount, llKeepID Local Array laEvents(1) With This.oEventhandlers * find entries in oEventhandlers collection with nonexistant event souce objects For lnCount = .Count To 1 Step -1 llKeepID = .F. If Type("paObjects",1)="A" For Each loObject In paObjects If Pemstatus(loObject,"cDesignTimeID",5) And .GetKey(loObject.cDesignTimeID)=lnCount llKeepID = .T. Exit Endif Endfor Endif If !llKeepID And Aevents(laEvents, .Item(lnCount))>0 And Vartype(laEvents(2))="O" llKeepID = .T. Endif If !llKeepID ? "removed "+.GetKey(lnCount) .Remove(lnCount) Endif Endfor * add an item for each new object in designtime with eventhandler, * if EventhandlerClass info is available. If Type("paObjects",1)="A" For Each loObject In paObjects If !Pemstatus(loObject,"cDesignTimeID",5) Or .GetKey(loObject.cDesignTimeID)=0 AddProperty(loObject,"cDesignTimeID",Sys(2015)) ? "added "+loObject.Name+ " as "+loObject.cDesignTimeID Try loEventhandler = Newobject(loObject.EventhandlerClass,; loObject.EventhandlerClasslib,"",loObject) Catch ? "failed to create eventhandler" loEventhandler = .Null. Endtry .Add(loEventhandler,loObject.cDesignTimeID) Endif Endfor Endif Endwith Endproc EnddefineBye, Olaf.