I got this code from windows c#
private void frmMain_Load(object sender, EventArgs e)
{
serialPort1.Open();
if (serialPort1.IsOpen)
{
this.serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
}
}
and I am using this Converter to convert it to windows form code.
I got this code after converting it
Private Sub frmMain_Load(sender As Object, e As EventArgs)
serialPort1.Open()
If serialPort1.IsOpen Then
Me.serialPort1.DataReceived += New System.IO.Ports.SerialDataReceivedEventHandler(Me.serialPort1_DataReceived)
End If
End Sub
but I have a problem in Me.serialPort1.DataReceived
see picture below