All other threads except the main thread are created on my computer because the application window is registered to receive session change notifications using the Wtsapi32.WTSRegisterSessionNotification API. You can see the implementation inside the Vcl.Forms -> TApplication.CreateHandle procedure. This should be related to how the application works / looks when you log in to Terminal Services / Remote Desktop. Some other threads may exist because some other / s programs load code into your executable.
source share