Re: Crossthread operation



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
.



Relevant Pages

  • Sub-items dont load in Admin Console over vpn
    ... I'm trying to administer my Sms2003 server via the admin console on an XP Pro ... sp1 machine while connected remotely. ... The connection to the site db appears to be made ok and the main console tree ...
    (microsoft.public.sms.admin)
  • Re: RDP connectivity to SBS2003 lost
    ... >> wizard and by rebooting the server. ... >> procedure seems to have introduced another one: RDP connection to the ... >> travel to the box's console. ...
    (microsoft.public.windows.server.sbs)
  • Re: Help request: problems with a 5.1 server and large numbers of ssh users.
    ... and thus the connection is being dropped. ... > I have a RedHat Linux server running the 2.4.18-3smp kernel on a dual ... I believe this to be some sort of resource limit issue, ... it did spawn a child process, ...
    (freebsd-current)
  • Re: Help request: problems with a 5.1 server and large numbers of ssh users.
    ... and thus the connection is being dropped. ... > I have a RedHat Linux server running the 2.4.18-3smp kernel on a dual ... I believe this to be some sort of resource limit issue, ... it did spawn a child process, ...
    (freebsd-hackers)
  • RE: Admin console access problem
    ... We had the same problem with the admin consoles not working. ... permission someplace and they are not able to access the console anymore. ... Now user in A runs console and gets 'connection ... >> connect to server. ...
    (microsoft.public.sms.admin)