The major problem that i have been stuck with is when a client disconnects from the server, the connection is closed and the control is unloaded.

when i try to send new information to other clients i am using a "For next" loop, however when i do this, it will error because one of the connections is not connected at the time.

i searched on google to see if i could change the index property of a control at runtime so that i can fix the control array so that there is no gaps, but after looking i don't think you can change that value..

what would be the easiest way to do this? to handle when a user leaves the chat and so that the server can still send messages to all connected clients.