J
Jan
Hello there,
I've got a strange problem using the readline method in vb2005 for
reading the serial port.
If I use the readchar method I can receive one character from
serialport. This is the code I use:
Function ReceiveSerialData() As String
' Receive strings from a serial port.
Dim returnStr As String = ""
Using com1 As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort("COM1", 2400,
IO.Ports.Parity.None, 8, 1)
com1.RtsEnable = True
Dim Incoming As Integer = com1.ReadChar()(Y)
returnStr = Chr(Incoming)
End Using
Return returnStr
End Function
this works well, but not with de readline method:
Dim Incoming As String = com1.ReadLine()(N)
returnStr = Incoming
I hope one of you can help me
TIA
I've got a strange problem using the readline method in vb2005 for
reading the serial port.
If I use the readchar method I can receive one character from
serialport. This is the code I use:
Function ReceiveSerialData() As String
' Receive strings from a serial port.
Dim returnStr As String = ""
Using com1 As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort("COM1", 2400,
IO.Ports.Parity.None, 8, 1)
com1.RtsEnable = True
Dim Incoming As Integer = com1.ReadChar()(Y)
returnStr = Chr(Incoming)
End Using
Return returnStr
End Function
this works well, but not with de readline method:
Dim Incoming As String = com1.ReadLine()(N)
returnStr = Incoming
I hope one of you can help me
TIA