| The Comm control
has a bug where the InBufferCount property is read-only when it really should be
read-write. To work around
this bug simply read the contents of the input buffer to clear it. Below is a reuseable
routine that does this for you. Here is a command1 click event that will call the reusable
routine to clear the buffer.
Private Sub Command1_Click()
'Workaround for the InBufferCount bug
InBufferClear Comm1
End Sub
Public Sub InBufferClear(CommControl)
'================================
'PURPOSE: Clear the Comm buffer
' (set InBufferCount = 0)
'PARAMS: CommControl = A Comm
' Control Reference
'===============================
Dim Dummy
Dummy = CommControl.Input
End Sub |