Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

Detecting internet connection

 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
felipes
Asked:
felipes
1 Solution
 
clifABBCommented:
I suppose one could use the internet transfer control and detect if there are any errors.
0
 
dgb001Commented:
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
 
felipesAuthor Commented:
 Do you mean ICQ keeps sending internet request time to time to detect connection???
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now