Results 1 to 8 of 8

Thread: [RESOLVED] How do I input an IP address into a chat program?

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2006
    Posts
    36

    Resolved [RESOLVED] How do I input an IP address into a chat program?

    Greetings- I am really new to VB(started yesterday) and have spent the last few hours trying to solve a problem.

    Instead of "hard coding" an IP address into the client, I want the user to be able to type it into a text box and then use that as the variable. If I could get a lil nudge in the right direction I would be very grateful. Below is some of the code and hopefully you will understand what I am trying to do. Also, I found a way to do it with an input command, but I want to be able to type the IP into a text box and then use that as the variable. Does that make sense to anyone?


    insertIP = (insertIP.Text)
    If insertIP <> "" Then
    If Winsock1.State <> sckClosed Then Winsock1.Close
    Winsock1.RemoteHost = insertIP.Text
    Winsock1.RemotePort = 5000
    Winsock1.LocalPort = 0
    Winsock1.Connect
    End If

    Thanks for any and all replies.

    Bry

    EDIT-See bottom post for correct code.
    Last edited by BryanW; Jun 30th, 2006 at 12:56 PM.

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