9
Answers

Rich textbox and string differing

Ask a question
Glenn Patton

Glenn Patton

12y
1.6k
1
Hi All,

First question, I am reading a serial port and putting output to a string,
but the string is blank, however if I stick a message box in, it causes enough of a gap to allow the text to appear in the string.  I am using a delay based on the length of the expected reply. 
The line of code that appears is reply = rtbIncoming.text.
rtbIncoming.Text has a string in it from the device.  Is it because of seperate threads the reply in the text box appears on one thread, there is not enough of a delay for it to get from the comms thread to the UI thread?

Glenn


 

Answers (9)