There are two ways you can do that, one is to simply try and make a web
request to a known url and catch the exception that would occur when
there is no internet connection, this method is detailed here
http://www.code101.com/Code101/DisplayArticle.aspx?cid=77
and here
http://www.developerfusion.com/show/3903/
secondly, you can use the InternetGetConnectedState() API from
WinInet.dll, this method is detailed here
http://www.vbip.com/wininet/wininet_dialup.asp
and here
http://vbnet.mvps.org/index.html?code/network/internetgetconnectedstate.htm
Hope that helps.
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
> In a Library or Win Forms application how can my code test whether the
> computer is connected to the Internet? (The computer could use a dial-up
> connection or it could be on a network.)
>
> TIA