Benny wrote:
I have a richtextbox that acts like a console with information on the status
of the server I am creating. I spawn new threads for each connection that is
created and would like to write the status to the console. When I try to do
that right now it gives me the error "Cross-thread operation not valid:
Control 'rtbConsole' accessed from a thread other than the thread it was
created on."
Well, this is not allowed, as you might have guessed :-) One article
that explains this very well is Jon Skeet's Threading overview, here's
the link to the relevant page:
http://www.yoda.arachsys.com/csharp/...winforms.shtml
You might want to read the rest of it (switch to other pages at the
bottom) if you do a lot of threading in your app.
Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619
http://www.sturmnet.org/blog