all groups > vb.net controls > may 2006 >
You're in the

vb.net controls

group:

mscomm inputlen property (vb6) in vb 2005 how it works ?


mscomm inputlen property (vb6) in vb 2005 how it works ? Brahm
5/30/2006 10:51:03 AM
vb.net controls:
Hey guys,

In vb 6 I used to use inputlen property to set the numer of bytes to
read in serial port input buffer. In vb2005 I am not finding
the same property in serialport component.

does anyone could help me with this ?

Daniel

Re: mscomm inputlen property (vb6) in vb 2005 how it works ? Dick Grier
5/30/2006 11:08:31 AM
Hi,

Even in VB6 (IMO), you should not use InputLen this way. I ALWAYS recommend
that you leave it at the default (0), and read ALL available data into a
buffer. Process data out of that buffer -- this is more reliable, and does
not impact performance in any negative way.

If you look at the Object model of the classes that I've designed for
..NET... I didn't include an InputLen property (its implementation causes
extra overhead in the serial class itself). See my homepage, Downloads.

I have more information on this topic, and others, in my book. See below.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.

AddThis Social Bookmark Button