Re: Crossthread operation
- From: Oliver Sturm <oliver@xxxxxxxxxxxx>
- Date: Sat, 27 Aug 2005 18:36:08 +0100
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/threads/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 .
- Follow-Ups:
- Re: Crossthread operation
- From: milk-jam
- Re: Crossthread operation
- References:
- Crossthread operation
- From: Benny
- Crossthread operation
- Prev by Date: Re: Parameterized SQL text for Oracle?
- Next by Date: Re: Crossthread operation
- Previous by thread: Crossthread operation
- Next by thread: Re: Crossthread operation
- Index(es):
Relevant Pages
|