> Or, are you resetting the String1 between reads?

I was mainly going off the example in the LR for that one. They have:

Sub DataAvailable()
EditField1.Text=EditField1.Text+ Me.ReadAll()

I guess maybe that's my other problem (though I'm still not sure about why
the port itself keeps getting locked up or changing). Is there a better way
to read an unknown-length of data in the DataAvailable event, rather than
appending it like above?

The device would be sending back a couple hundred lines of ascii text, each
with a linebreak. I wasn't exactly sure how often the DataAvailable event is
actually fired (didn't test that yet either); I'm assuming it's just when
*any* data is available, so I guess it would be called for each and every
single character that comes in...is that right?

The only other thing I could think of was to have a timer continually poll
the serial with lookahead, and when it finds a linebreak, it adds it to the
string; but it seemed like an inefficient method of just doing what the
DataAvailable event does already. Do you know what would be a better
alternative?

Chad


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to