I want receive datas commands on RS232 with VB.net
Currently my code work well, but except if no data are received, the userForm can't be used, because the code is in serialport.read continuously. How to do to allow user to access the form. I planned to implement DoEvent() function, but how ? Have you ideas ?
Here's my code:
Try
readBytes = Form1.SerialPort1.Read(buffer_rx, offset, remaining)
offset += readBytes
remaining -= readBytes
totalReadBytes += readBytes
Catch ex As TimeoutException
ReDim Preserve buffer_rx(totalReadBytes - 1)
End Try
Thx,