![]() |
webBrowser control, how to detect user is not connected to interne
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. |
webBrowser control, how to detect user is not connected to interne
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. |
All times are GMT +1. The time now is 11:24 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com