Solved

Detecting when the internet is connected

Posted on 2001-06-06
5
150 Views
Last Modified: 2010-05-02
I want to build a program that can detect the connection and the deconnection of the internet.
The computer where the prog will be running is connected to a local network who has a modem to connect to the internet.
Resuming i want to know when the internet is active in thst computer, i say the internet because i want to monitor severall services.
Another point os that the net on the server might be running to other pcs but i want to know if that one is running internet or not.

50 bonus points for quick answer
0
Comment
Question by:ElvasLion
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 6

Expert Comment

by:JonFish85
ID: 6160309
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6160433
Hi!

Here's a link for you:

Download...
http://www.vb-helper.com/Howto/chkmodem.zip
Description: See if the modem is connected (5K)

Actually, the best method would be to ping a website and see if there's a response o not.  That would detrmine whether there is a connection or not.

That's it!

glass cookie : )
0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 200 total points
ID: 6160450
Hi!

Here's a better code than the one I posted ppreviously.

Download...
http://www.freevbcode.com/code/IsConnect3.zip

Description: This nice demo application demonstrates 3 ways to detect whether or not a current Internet connection is active -- by checking the registry, by using functions within the wininet.dll, and by pinging yahoo.com. Remarks explaning the advantages and disadvantages of each method are included within the application.

Do note that this one includes the pinging part.  So, here's the code for it : )

That's it!

glass cookie : )
0
 
LVL 1

Author Comment

by:ElvasLion
ID: 6178098
sorry for the delay but i could'nt reply before. Your answer was excellent and i'm going to give you your bonus points.
Thanks
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6179862
Thanks a lot too : )
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question