Results 1 to 3 of 3

Thread: WinsockIP Static

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    4
    Hi again,

    I'm doing this from memory but I wrote a really simple program that sat in the system tray and displayed my computer's IP address when I held my mouse over the icon.

    It was something like,

    SystemTray.ToolTip = WinsockIP1.Local

    I cant remember it exactly.

    Oh, and I have a foriegn to get the tray icon etc...

    Anyhow, the problem is this;

    The program loads, and displays the IP addy of 127.0.0.1, which is fine, but when I connect to the internet it still displays 127.0.0.1, not the new value.

    Also, when I run the program when I'm connected to the internet, I get my IP addy, summut like 204.214.xxx.xxx

    But when I disconnect and reconnect again, the IP value doesnt change.

    I'd like a way to refresh the value.

    I downloaded many programs with source code that displayed the IP address, but all of them didn't refresh the IP addy when it changes.

    When I've got time I will be taking a look at a nice chunk of code I saw concerning this at this forum, but it was a little too low down for me to churn thru right now.

    Is there a quick fix?

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    as far as this goes
    204.214.xxx.xxx

    That is assigned by your internet service porvider. You cannot change that in code.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3
    Hyperactive Member
    Join Date
    Sep 2000
    Posts
    257
    what's wrong w/ a timer control ?
    When I write my code, only God and I know what it means. But a week later, only God knows.

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