日期:2014-05-20 浏览次数:20978 次
[DllImport("wininet")] private extern static bool InternetGetConnectedState(out int connectionDescription, int reservedValue);
int i = 0; if (InternetGetConnectedState(out i, 0)) { MessageBox.Show("联网状态"); } else { MessageBox.Show("你网线掉了啦"); }