Solved

Detecting internet connection

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

919 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

21 Experts available now in Live!

Get 1:1 Help Now