Add the control you want to use into a class that is saved in a Visual Class library or into a class created with the DEFINE CLASS command. Next, add an instance of the class at run-time instead of adding the control.I'm currently using this to access the control:
DEFINE CLASS EMPS_Class AS SESSION OLEPUBLIC * Using the MSWinsck control for basic port communications IMPLEMENTS DMSWinsockControlEvents IN "c:\windows\system32\mswinsck.ocx" lGarbageCollected = .F. oSock = NULL ********************************************************** PROCEDURE INIT * Create the port communication object THIS.oSock = CREATEOBJECT("MSWinsock.Winsock.1") ENDPROC