1. Does the event OnConnect get's executed in a separate thread ?
Yes, the event will get fired as the other events do, even if you are running in a separate thread. The question remains to be answered by you is why. The TIdTCPServer
already uses multithreading thus
it can be used in a main thread context (on a form).
2. Can I update the VCL from the OnConnect event ?
Yes, but you will have to use some GUI synchronization practice, such as Synchronize
method or e.g. message posting from the separated worker thread to your main one.
3. If MaxNumberConnections is set to 0 what does it exactly mean ?
Zero value assigned to the MaxConnections
means there is no limit of connections at one time.