Re: MSComm1_OnComm()'s comEvReceive first or Buffer = MSComm1.Input



Thanks.

if I have two routine to receive data ( in fact, I didn't do this )

1. Private Sub MSComm1_OnComm()
select
Case comEvReceive
buffer_A = mscomm1.input

2. In a Timer ( as high speed as possible )
while (true)

if ( MSComm1.InBufferCount > 0) Then
buffer_B = mscomm1.input

wend

So, when a data byte is coming, which one will get data? buffer_A or
buffer_B?

Thank you very much!
Best regards,
Boki.


"Dick Grier" <dick_grierNOSPAM@xxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:eznBzMOAGHA.1952@xxxxxxxxxxxxxxxxxxxxxxx
> I'm not sure what you mean. If you set the InputMode property to
> comInputModeBinary, then you MUST use an array of type Byte to buffer
> receive data. You also should use arrays of type Byte for transmit data,
> though that isn't required. However, if you set the InputMode property to
> comInputModeText, then you must use a String to buffer receive data.
>
> --
> Richard Grier (Microsoft Visual Basic MVP)
>
> See www.hardandsoftware.net for contact information.
>
> Author of Visual Basic Programmer's Guide to Serial Communications, 4th
> Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
> www.mabry.com/vbpgser4 to order.
>
>


.