PDA

View Full Version : سوال: مشکل کش و وضعیت اتصال کانکشن برای webbrowser



hercool
چهارشنبه 17 مهر 1392, 15:02 عصر
سلام دوستان چطور میشه حذف کش کرد در webbrowser
با استفاده از این کد ها هم خواستم وضعیت کانکشن رو چک کنم که عملا کاری نمیکنه

bool IsConnectedToInternet()
{
bool a;
int Desc;
a = InternetGetConnectedState(out Desc, 0);
return a;
}
public partial class formnahaii : Form
{
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState(out int Description, int ReservedValue);
using System.Runtime.InteropServices;


if (!IsConnectedToInternet()) { MessageBox.Show("اتصال اینترنت قطع است"); }
if (IsConnectedToInternet() == false) { MessageBox.Show("اتصال اینترنت قطع است"); }