Hi, I still don't get the overall architecture of your app. If you want help, then please explain yourself. This is what I got so far: - it is a server app; AFAIK most servers create a thread for every incoming request, so each request can get handled at its own pace (the alternative of just queueing all requests and handling them one by one does not scale well). - you use AcceptTcpClient() which is a blocking call; if you do this on the main thread, the GUI dies until a client comes in??? otherwise, you need a separate thread that accepts clients and dispatches them. suggestions: - explain the architecture, using real names; - show actual code, not just a skeleton; but not hundreds of lines, just the relevant pieces. - when in doubt about threading use either someControl.InvokeRequired; whenever it returns true you need to use (Begin)Invoke - and/or when in doubt about threading, log the Thread.CurrentThread.ManagedThreadId so you can compare it to the one of the GUI thread (by logging ManagedThreadId say inside a form load handler). :)
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).