PDA

Click to See Complete Forum and Search --> : IP


Zaphod64831
May 4th, 2000, 05:51 AM
Does anyone know where I can find a simple tutorial on how to send a string to an IP address? I'm wanting to make a simple chat program and still haven't figured that part out yet.

rino_2
May 13th, 2000, 03:56 PM
Hi,

I've just made a chat program so I can help. To do this you must first of all add the WinSock.OCX to your form. You must know the IP address of the computer you're sending the message to and set the 'Remote IP' on the OCX to this IP address. Now you must specify a port for your computer and a port for the computer that you are sending the message to. I'm not going to go into too much detail because theres a lot to talk about so I recommend you read some of the tutorials on this site. Type WinSock in the search and you're sure to find what you're looking for. You could also download some nice ready made chat programs from this site http://www.planet-source-code.com

Good Luck!

May 14th, 2000, 01:20 AM
simple, I never really got my chat prog working,
but this SHOULD work
you need a txtSend, and a txtIP
IP is where you type the ther persons ip, txtsend is where you type the stuff to send..
you will also need a txtReceive, this is where the other peoples text goes after you get it.

Private Sub Command1_Click()
Winsock1.RemoteHost = txtIP.Text
Winsock1.SendData txtSend
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
Winsock1.GetData strData
txtReceive = txtReceive & vbCrLf & strData
End Sub



that should work...

Codewarrior123
May 16th, 2000, 12:04 PM
Search "winsock" in http://www.vbsquare.com... you sould come up with some way of doing it.