Assuming that the handler isn't doing anything else, try it like this
Code:Private Sub SerialPort1_DataReceived(sender As Object, _ e As IO.Ports.SerialDataReceivedEventArgs) _ Handles SerialPort1.DataReceived If SerialPort1.BytesToRead > 12 Then 'call to GetData here End If End Sub




Reply With Quote