Solved

Detecting when the internet is connected

Posted on 2001-06-06
5
144 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
  • 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now