Information générale
Catégorie:
Contrôles ActiveX en 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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement