Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Omaha, Nebraska, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check Network Connectivity (VB 6.0 sp3)

    Does anyone know how to use VB to check the status of the local area network connection? i.e. connected or disconnected

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check Network Connectivity (VB 6.0 sp3)

    Look up WNetGetConnection for checking for a network connection.

    Then I use WNetAddConnection2 to actually make the connection and test it's return value for errors. More "robust" as I recall.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check Network Connectivity (VB 6.0 sp3)

    and where was your input on this thread?

    Brooke

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check Network Connectivity (VB 6.0 sp3)

    Hey man,

    I saw that one after I answered this one. It looked like Jeff had you covered there. Do you need any help with code samples or have you got it nailed down now?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check Network Connectivity (VB 6.0 sp3)

    Well, it's covered - I can now do what I want - but as I said, it doesn't seem the best way to go. More time required at allapi, i guess!

    Brooke

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check Network Connectivity (VB 6.0 sp3)

    Don't forget <A target="_blank" HREF=http://www.vbworld.com/api/>this gem</A> if you are in a hunting/gathering mode...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check Network Connectivity (VB 6.0 sp3)

    Not that I've totally checked that link out, but if you've known about it for more than a millisecond before alerting the lounge I'm going to ask eileen to ban you from hereabouts!

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Check Network Connectivity (VB 6.0 sp3)

    Nice site, huh?

    While you're at it (and, Ok here it is Loungers: I you have not seem this, I'm announcing it now! the Windows API-Guide</font color=448800>[/b] (not the same as the API-Guide!!). If you are learning the API for use this VB/VBA, this is a great resource from Paul Kuliniewicz

    Brooke, I know a lot of things I have told you yet...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •