
'setup comm object
    ' Fire Rx Event Every 1 Byte
MSComm1.RThreshold = 1

' When Inputting Data, Input 2 Bytes at a time
MSComm1.InputLen = 1

' 9600 Baud, No Parity, 8 Data Bits, 1 Stop Bit
MSComm1.Settings = "9600,N,8,1"
' Disable DTR
MSComm1.DTREnable = False
'MSComm1.InputMode = comInputModeText //*****NOTICE THIS IS OUT
' Open COM1
MSComm1.CommPort = 1
MSComm1.PortOpen = True


Receiving is done with a routine like this. End of the transmission is a carriage return. 


Public Sub MSComm1_OnComm()
    Dim newChar As String
    Select Case MSComm1.CommEvent
        Case comEvReceive
            newChar = MSComm1.Input
            If newChar = Chr(13) Then // \n end of line
                lblData.Caption = CStr(NewChar)
                Me.Print ""  'skip a line
            Else
                NewChar = NewChar & MSComm1.Input
            End If
            ' process other events here
    End Select
End Sub
