>I'm sorry - wrong code :-(
>
>That should be ocommform.comminput.input to read the port. Here is the basic definition that uses a form class property "inbuffer" to hold the data. It could just as easily be a property of your control subclass.
>
>DEFINE CLASS incomm AS CUSTOM
> IMPLEMENTS dmscommevents IN mscomm32.ocx
> PROCEDURE dmscommevents_oncomm
> WITH ocommform
> IF .comminput.commevent = 2
> .inbuffer = .inbuffer + .comminput.INPUT
> ENDWITH
> ENDPROC
>ENDDEFINE
>
I am doing it slightly differently.
Tell me what I am doing wrong, please.
Form' Init:
SET PROCEDURE TO D:\foxframework\classes.fxp ADDITIVE
cntTest1 = NEWOBJECT('cntTest1', 'd:\foxframework\classes.fxp')
ThisForm.AddObject("ComReader","ComReader")
EVENTHANDLER(ThisForm.ComReader.Object, cntTest1)
*!* 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
ENDPROC
ENDDEFINE
So, how do I read INPUT?