web development India freelance website designer
This is the easiset bit of Winsock programming. All you have to do, is set the Winsock properties, then call the .Connect
method. Mswinsck.ocx will do the rest, and alert you to the success of the method via one of two events -
Winsock_Connect() and Winsock_Error(). The code looks like this:

Private Sub cmdConnect_Click()
' set up the Winsock properties
' and start the connect sequence
Winsock.RemoteHost = "127.0.0.1"
Winsock.RemotePort = "12345"
Winsock.Connect
End Sub

Private Sub Winsock_Connect()
' we're connected
MsgBox "Connected to: " & Winsock.RemoteHostIP
End Sub

Private Sub sckMain_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)
' alert the user to the error
MsgBox "Error: " & Description
End Sub

'Thats it! Easy.

Make a connection

1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550

Freelance ASP PHP web development | Web developer India Web development India| Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design