The OnConnect event is generated when a connection is
established.
Syntax
Subobject_OnConnect ( [IndexAs
Integer] )
Remarks
The OnConnect event is generated when a connection is made
with a remote host as a result of a Connect method call, or
when an Accept method call is completed. This event is only
generated for asynchronous sockets when the Blocking property
is set to False.