Visual Basic: MSComm Control

Input Property Example

This example shows how to retrieve data from the receive buffer:

  Private Sub Command1_Click()
Dim InString as String
' Retrieve all available data.
MSComm1.InputLen = 0

' Check for data.
If MSComm1.InBufferCount Then
   ' Read data.
   InString = MSComm1.Input
End If
End Sub