vb.net - vb SerialPort one message behind -


i followed tutorial create simple serialport monitor: http://www.innovatic.dk/knowledg/serialcom/serialcom.htm

i expecting 15+ lines of messages, 1 second pause, 15+ lines of messages, etc.

message 1, line 1 message 1, line 2 message 1, line ... message 1, line 14 message 1, line 15 . . (1 second pause) . . message 2, line 1 message 2, line 2 message 2, line ... message 2, line 14 message 2, line 15 

the problem final line in first message gets displayed @ start of second message:

message 1, line 1 message 1, line 2 message 1, line ... message 1, line 14 . . (1 second pause) . . message 1, line 15 message 2, line 1 message 2, line 2 message 2, line ... message 2, line 14 

here code:

private sub receiver(byval sender object, _     byval e serialdatareceivedeventargs) handles serialport1.datareceived     try         me.begininvoke(new stringsubpointer(addressof display), serialport1.readline)     catch ex exception         msgbox(ex.message)     end try  end sub  private sub display(byval buffer string)             richtextbox1.appendtext(buffer)             richtextbox1.scrolltocaret() end sub 

what can fix this?

thank you, brett


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -