Solved

Detecting internet connection

Posted on 1998-06-19
3
203 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
[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 Comments
 
LVL 6

Expert Comment

by:clifABB
ID: 1463780
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
ID: 1463781
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
ID: 1463782
 Do you mean ICQ keeps sending internet request time to time to detect connection???
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month10 days, 11 hours left to enroll

628 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