DEFINE CLASS form1 AS form Top = 0 Left = 0 Height = 99 Width = 573 DoCreate = .T. Caption = "Server" Name = "Form1" ADD OBJECT olecontrol1 AS olecontrol WITH ; Top = 12, ; Left = 12, ; Height = 100, ; Width = 100, ; Name = "Olecontrol1" ADD OBJECT label1 AS label WITH ; WordWrap = .T., ; Caption = "", ; Height = 36, ; Left = 156, ; Top = 12, ; Width = 384, ; Name = "Label1" ADD OBJECT olecontrol2 AS olecontrol WITH ; Top = 60, ; Left = 12, ; Height = 100, ; Width = 100, ; Name = "Olecontrol2" ADD OBJECT label2 AS label WITH ; Caption = "State:", ; Height = 24, ; Left = 48, ; Top = 12, ; Width = 60, ; Name = "Label2" ADD OBJECT label3 AS label WITH ; Caption = "Bytes Received:", ; Height = 17, ; Left = 48, ; Top = 72, ; Width = 180, ; Name = "Label3" PROCEDURE Init With THISFORM.Olecontrol1.Object .Listen Endwith ENDPROC PROCEDURE olecontrol1.ConnectionRequest *** ActiveX Control Event *** LPARAMETERS requestid With THISFORM .Olecontrol2.Accept(requestid) .Label2.Caption = 'State: ' + transform(.Olecontrol2.State) Endwith ENDPROC PROCEDURE olecontrol2.DataArrival *** ActiveX Control Event *** LPARAMETERS bytestotal local lcdata lcdata = replicate(chr(0),200) THISFORM.Label3.Caption = 'Bytes received: '+transform(bytestotal) THIS.GetData(@lcdata) THISFORM.Label1.Caption = lcdata ENDPROC PROCEDURE olecontrol2.Close *** ActiveX Control Event *** THIS.Close ENDPROC PROCEDURE olecontrol2.Destroy THIS.Close ENDPROC ENDDEFINESet the LocalPort of both Winsock controls in the property sheet (it didn't show up in code). The first instance of the Winsock listens and when it detects a ConnectionRequest, it tells the second control to Accept the incoming request. The first continues to Listen.