Hi. VB6 was amazingly easy to use. I am a new comer to VB.NET and having problems that I did not encounter in VB6. Anyways, what is wrong with the code below for VB 2005 to complain of "...an unhandled exception of type System.IO.IOException occurred in System.dll..."
Imports System
Imports System.IO.Ports
Private Sub DataReceivedHandler(ByVal sender As Object, ByVal e As SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Dim count As Integer = 17
Dim bytebuffer(17) As Byte
While count > 0
bytebuffer(17 - count) = SerialPort1.ReadByte
count = count - 1
End While
End Sub
Thanks.
Imports System
Imports System.IO.Ports
Private Sub DataReceivedHandler(ByVal sender As Object, ByVal e As SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Dim count As Integer = 17
Dim bytebuffer(17) As Byte
While count > 0
bytebuffer(17 - count) = SerialPort1.ReadByte
count = count - 1
End While
End Sub
Thanks.