C
Craig Lister
I am trying to write an app that accepts many connection from a client
(TCP).
So, threads are required (I assume).
I have created a thread, but when a connection is established, I'd like to
write this to a RichEdit. So the code inside the thread code needs to access
this RichEdit control. Problem is, many threads can access it at the same
time, so it gives error...
"Cross-thread operation not valid: Control 'reStatus' accessed from a thread
other than the thread it was created on."
How do I allow a thread to write to a control on my form?
Thanks,
Craig
Websites:
http://www.thelisters.co.uk/
http://www.myschoolmates.com/
(TCP).
So, threads are required (I assume).
I have created a thread, but when a connection is established, I'd like to
write this to a RichEdit. So the code inside the thread code needs to access
this RichEdit control. Problem is, many threads can access it at the same
time, so it gives error...
"Cross-thread operation not valid: Control 'reStatus' accessed from a thread
other than the thread it was created on."
How do I allow a thread to write to a control on my form?
Thanks,
Craig
Websites:
http://www.thelisters.co.uk/
http://www.myschoolmates.com/