Ok this is a no brainer and i've done it before but i am losing my mind. I totally forget how to do it :mad: so, can someone tell me how to connect to a server and port. thanks.
Printable View
Ok this is a no brainer and i've done it before but i am losing my mind. I totally forget how to do it :mad: so, can someone tell me how to connect to a server and port. thanks.
VB Code:
winsock1.Connect RemoteHostIp/Name, RemotePort
Is that what you were after ??
Put the winsock control on your form. Put the remote server, and port it, i.e(www.vbforums.com, port 80).
Then in a command button, or what you'd prefer, put:
Winsock1.Connect
You can also use optional values for .Connect, for host, and IP.
I did do that I did...
Private Sub Command1_Click()
Winsock1.Connect (somesite.something.com, 80)
End Sub
and it said i needed a = thing at the end and then if i take the ()'s away it says object required i think...
ok i got it..i was really stupid..i had it in the winsock properties in VB and then i tried typing that code in. So , thanks anyway.