Solved

Detecting internet connection

Posted on 1998-06-19
3
198 Views
Last Modified: 2010-05-03
 I need to detect if the computer is connected to the internet (and don't want to show that dial-up window). I tried a code I found somewhere that looks for a value in the ssystem registry, but that doesn't work with LAN connections...
  There is another way?
0
Comment
Question by:felipes
3 Comments
 
LVL 6

Expert Comment

by:clifABB
Comment Utility
I suppose one could use the internet transfer control and detect if there are any errors.
0
 
LVL 1

Accepted Solution

by:
dgb001 earned 100 total points
Comment Utility
Use VB's Inet control (which is not visible at run time), to make a request to a known internet address. If it's not able to make a connection then it will result in a trappable error 11 response. Timeout for the control can be altered, though the default is 60 seconds. You can't necessarily assume that this is failsafe though since there genuinely could be a problem with the address which you're trying to connect to, or it really could have timed out because it's busy, so you may want to issue the request a couple of times.
0
 

Author Comment

by:felipes
Comment Utility
 Do you mean ICQ keeps sending internet request time to time to detect connection???
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

743 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

10 Experts available now in Live!

Get 1:1 Help Now