General information
Category:
ActiveX controls in VFP
Thanks, Ed.
These are info about communication.
asynchronous stream,
no parity bit,
no handshaking
I coded as follows.
----------
Form.Init :
Thisform.Olecontrol1.ComPort=1
Thisform.Olecontrol1.Portopen=.T.
Form.Command1.Click :
Thisform.Olecontrol1.output=chr(0xaa)+chr(0x34)+chr(0x00)+chr(0x01)+;
chr(0x00)+chr(0x01)+chr(0x00)+chr(0x00)+chr(0x00)+chr(0x10)+chr(0x00)+;
chr(0x00)+chr(0xF0)
Form.Olecontrol1.OnComm :
if this.commevent=2
vcon=thisform.olecontrol1.input
thisform.edit1.value=vcon
endif
-------
The result is nothing. Nothing is in the edit box.
I think the problem is input. If the Input type is hex, is there something that I should do?
Also When I changed 0-Text into 1-Binary at InpuMode of MSComm, an error occurred. The Message is "Array dimensions are invalid".
Thanks for any advise.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only