Results 1 to 4 of 4

Thread: ip address

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    69

    ip address

    I don't know if I am asking in the right place, but I need to find my IP address within my program. You see, it is dynamic, and when my program starts, I want to put it into a text box. Any help?

  2. #2
    New Member
    Join Date
    Jan 2002
    Location
    Sweden
    Posts
    8
    the easiest way to go on this one is to use the Winsock control that comes with Vb. Check it the components list.

    and then there is a property called localip or localadress or something..

    ex. winsock.localaddress

    if u got multiple IPs this will be a problem. Then u´ll have to go thru the WinsockAPI or a more advanced control.

    good luck

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    VB Code:
    1. Text1.Text = Winsock1.LocalIP

  4. #4
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674
    After adding the winsock component:

    Code:
    Private Sub Form_Load()
     Text1.Text = Winsock1.LocalIP
    End Sub
    "I have not failed. I've just found 10,000 ways that won't work."
    'Thomas Edison'

    "If we knew what it was we were doing it wouldn't be called research, would it?"
    'Albert Einstein'

    VB6

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