Home All Groups Group Topic Archive Search About
Author
4 Jan 2006 8:00 PM
Jan
Hi

why is this piece of code not working?????
It's getting really frustrating.
I can not figure it out.

If I replace the readline method for readchar it's working. But one
character. I want to read everything from the serialport

SerialPort1.Open()

        TextBox1.Text = SerialPort1.ReadLine

SerialPort1.Close()

I hope someone has the answer

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Author
4 Jan 2006 9:56 PM
DickGrier
Did you see my reply to your previous inquiry?

Do you know that this "should" work?  Have you examined the data from your
device to make sure that it actually it terminated with both carriage return
and line feed characters in that order?

There are other (better, IMO) ways to handle this problem.

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition, ISBN 1-890422-28-2, Mabry Publishing (391 pages, includes CD-ROM).
July 2004.
See www.hardandsoftware.net for details and contact information.
Author
5 Jan 2006 3:06 PM
Jan
Hi Dick,

Youre absolutly right. That was the problem.
I received my line of text, but know with a linefeed and a CR.

Thank you very much for the tip

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com