Hi want to call the method HANDLEINPUT(BYVAL m_strInBuff) from the data received event.

Please help.

My code is:

Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived

Try
If SerialPort1.BytesToRead >= 4 Then

SerialPort1.ReadTimeout = 1000

m_strInBuff = (SerialPort1.ReadTo(Chr(13)))

'Show_Error("m_strInBuff = " & SerialPort1.ReadExisting)
End If

'data to UI thread
'Me.Invoke(New EventHandler(AddressOf DoUpdate)) '//Commented oujt for test only
Me.Invoke(New EventHandler(AddressOf HandleInput(m_strInBuff)))


Catch ex As Exception
MsgBox("read " & ex.Message)
End Try
'End If
End Sub

Please help how I can I modify the code here