General information
Category:
Coding, syntax & commands
I recently integrated a proximity card reader into one of my VFP apps. Let's see if I can point you in the right direction.
First I would worry about fopen() - instead look at MSCOMM32 activex
I opened and closed like this:
***************************************************************
IF This.CAPTION="Open Port"
if This.parent.Olecontrol1.portopen=.T.
This.parent.Olecontrol1.portopen=.F.
endif
This.parent.Olecontrol1.portopen=.T.
This.CAPTION = "Close Port"
ELSE
if This.parent.Olecontrol1.portopen=.F.
This.parent.Olecontrol1.portopen=.T.
endif
This.parent.Olecontrol1.portopen=.F.
This.CAPTION = "Open Port"
ENDIF
************************************************************
A little loose, but I only wanted the port open when needed. You can dump this input most anywhere. Then I set a limit of how much data to read. Variable input1 receives the input, then I go on the manupliate the string.
************************************************************
input1 = This.parent.Olecontrol1.INPUT
FOR i = 1 TO LEN(inval1)
input2 = ASC(SUBSTR(input1, i, 1))
This.Parent.Edit1.VALUE=This.Parent.Edit1.VALUE+;
" "+ALLTRIM(STR(input2))+" "
ENDFOR
************************************************************
Hope this helps.
MD
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