Delphi 快速检测是否联网 判断网线是否拔开。 但是不能判断是否能上网

https://blog.csdn.net/chelen_jak/article/details/50204145

Delphi 快速检测是否联网

转自:http://www.delphitop.com/html/wangluo/2990.html

use WinInet; 
  //正确检测是否在线方法
  if InternetGetConnectedState(nil, 0) then
  begin
    Self.Caption := '在线';
  end
  else
  begin
    Self.Caption := '脱机';
  end;
经测试,和QQ检测是否在线基本相同。
delphi lazarus opengl 网页操作自动化, 图像分析破解,游戏开发
原文地址:https://www.cnblogs.com/delphi-xe5/p/10947399.html