please check the attached picture. i want to receive data from another application to Visual studio windows form through serial port and apply some conditions to the received data as shown in the picture, but unfortunately i got this error and i tried more to fix it but in vain. I'm asking your kind help to over ride this problem and edit my code. Thanks
Private Sub SerialPort1_DataReceived(sender As System.Object, e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Dim value As Byte = SerialPort1.ReadLine()
If (((value) & 2) <> 0) Then
Label4.Visible = True
End If
End Sub
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
SerialPort1.Open()
End Sub