I was gona upload a complete one 4 u but there....
You set the server Ip and port on the options tab of each winsock control...
Private Sub Command1_Click()
Winsock1.Close 'close winsock so we dont get an error if clicked twice
Winsock2.Close
Winsock1.Connect 'attempt connection
Winsock2.Connect
End Sub
Private Sub Winsock1_Connect()
Shape1.BackColor = vbGreen 'server is online
Winsock1.Close 'close connection we dont need it open anymore
End Sub
Private Sub Winsock1_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)
'server is offline
Shape1.BackColor = vbRed
End Sub
Private Sub Winsock2_Connect()
Shape2.BackColor = vbGreen 'server is online
Winsock2.Close 'close connection we dont need it open anymore
End Sub
Private Sub Winsock2_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)
'server is offline
Shape2.BackColor = vbRed
End Sub
Private Sub Form_Load()
End Sub