Results 1 to 6 of 6

Thread: know when the computer is conect to the internet

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    isreal
    Posts
    5

    Post

    i want that my program will know when the computer is conect to the internet (throw a command buton) soory about my tapy mistake i am from isreal so if u can tell me the source code it will be great tank you and have a nice day

    ------------------
    yaniv garti

  2. #2
    Guest

    Post

    There is sample code on this site for exactly that, but YOU have to look for it. Check out "Topic Areas: Internet" and "Contents: Tips", OR the "Search" engine on this site.

  3. #3
    New Member
    Join Date
    Nov 1999
    Posts
    2

    Post

    I have try to search for that sample coding, but it doesn't work in Cablde MOdem and ISDN line......can you help ?


    ------------------
    Jason Abraham
    [email protected]

  4. #4
    New Member
    Join Date
    Nov 1999
    Posts
    2

    Post

    I have try to search for that sample coding, but it doesn't work in Cablde MOdem and ISDN line......can you help ?

  5. #5
    Guest

    Post

    Aren't those types of connections always connected? Anyway, (it's been a while) but a crude way I've used is to add a Winsock control and call it's "Listen" method. Then check out the Local Port and Local IP. If they are both non-zero, then I believe that means you have an internet connection. Periodically you could close the socket and "Listen" again and recheck those Local properties.
    I wrote a program using this technique to wait for my girlfriend to connect to the internet, then publish her IP and Port to my web site, while I would check my web site to see if the info was updated. Then I made a direct connection to her IP and Port and we would chat.
    Hope that helps.

  6. #6
    Addicted Member
    Join Date
    Jan 1999
    Posts
    173

    Post

    Nice idea, but if you are on the network then it will return your current IP Address. At the moment, the best way is to actually try and open a url and see if it fails. http://www.mvps.org/vb

    ------------------
    "To the glory of God!"

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