VB Code:
With MSComm1
.CommPort = 5 'ComPort
.Handshaking = comNone '2 - comRTS
.RThreshold = 1
.RTSEnable = True
.DTREnable = True
.Settings = "9600,n,8,1"
.SThreshold = 1
.InputMode = comInputModeText
.InputLen = 1
.PortOpen = True
' Leave all other settings as default values.
End With
VB Code:
Do While Timer < TimeOut + 1
If FrmHitScores.MSComm1.InBufferCount > 0 Then 'to be sure something in the buffer
sTEMP = MSComm1.Input 'get a byte
strRX = strRX & sTEMP 'assemble the input bytes into strRX
End If
If Len(strRX) = 7 Then
for a = 1 to 7
text1.text = text1.text & Hex(Asc(Mid$(strRX, a, 1)))
next a
strRX = ""
Exit Do
End If
Loop