Todo el procedimiento en el cliente:
Creamos un Winsock con el nombre "ESTADO"
Buscamos:
CÓDIGO:
Private Sub Form_load()
Antes del end sub agregamos:
CÓDIGO:
If ESTADO.State <> sckClosed Then
ESTADO.Close
End If
ESTADO.Connect "Ip de su servidor", "Puerto de su servidor"
Suplantar los dados por su IP y Puerto.
Siguiente paso:
Creamos un Label en el Frm_Connect llamado LblEstado.
Siguiente paso:
CÓDIGO:
Private Sub ESTADO_Connect()
LblEstado.ForeColor = vbGreen
LblEstado..Caption = "Online"
End Sub
Al final del frmconect agregamos:
CÓDIGO:
Private Sub ESTADO_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
LblEstado..ForeColor = vbRed
LblEstado..Caption = "Offline"
End Sub






![Newbie [1] Newbie [1]](./images/ranks/Rango0.gif)
