Results 1 to 4 of 4

Thread: IP

  1. #1

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268

    Question

    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.
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Wink

    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!
    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

  3. #3
    Guest
    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...

  4. #4
    New Member
    Join Date
    May 2000
    Posts
    11
    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
  •  



Click Here to Expand Forum to Full Width