|
Thread: IP
-
May 4th, 2000, 05:51 AM
#1
Thread Starter
Hyperactive Member
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.
-
May 13th, 2000, 03:56 PM
#2
Hyperactive Member
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
#3
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.
Code:
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...
-
May 16th, 2000, 12:04 PM
#4
New Member
Search "winsock" in http://www.vbsquare.com... you sould come up with some way of doing it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|