oform = CREATEOBJECT("form") oform.ADDOBJECT("ComReader","ComReader") oform.ADDOBJECT("test","cntTest1") EVENTHANDLER(oform.ComReader.OBJECT, oform.test) oform.show() READ EVENTS *!* definition of cntTest1: DEFINE CLASS cntTest1 AS CUSTOM IMPLEMENTS DMSCommEvents IN "MSCommLib.MSComm" PROCEDURE DMSCommEvents_OnComm() AS VOID; HELPSTRING "Occurs whenever the value of the CommEvent property changes." * add user code here ?oform.Comreader.INPUT ENDPROC ENDDEFINEYou need the form reference.