There really isn't a perfect way to tell if the user is or isn't connected
to the Internet. You can try a ping call to a known IP address, but that
would produce misleading results if for some reason that one site wasn't
available due to some sort of DNS or server problems. I usually try a couple
of sites such as
www.google.com and
www.microsoft.com to see about an
Internet connection.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"BatKing" wrote in message
...
Hi,
I have a from which has a System.Windows.Forms.WebBrowser control in
there.
my question is How can I tell the user is not connected to internet?
Currently I am trying to get the webBrowser.DocumentText or
WebBrowser.DocumentTitle and try to see if the content of the DocumentText
has some error message in there during DocumentCompleted event. but this
is
kind of stupid and what if the user is using a Non-English windows OS?
Thanks.