Solved

Detecting internet connection

Posted on 1998-06-19
3
201 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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA to copy paste columns form one file to other 20 100
How to make an ADE file by code? 11 99
Excel Automation VBA 19 102
VBA - If Bookmark = "XXBOOKMARKXX" then 15 51
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

749 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