HOW to read from serial port in visual basic

Status
Not open for further replies.

Deexith Hasan

Advanced Member level 4
Joined
Oct 24, 2014
Messages
111
Helped
4
Reputation
8
Reaction score
3
Trophy points
18
Visit site
Activity points
740
Code:
Dim a As String = SerialPort1.ReadByte
        If a Is Nothing Then
            Exit Sub
        Else
            RichTextBox2.Text = a

        End If

i used the above code to read from serial port but my application hangs here..... whats the mistake?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…