一句话判断网络是否联通

来源:互联网 发布:python str find 函数 编辑:程序博客网 时间:2024/06/11 23:02

uses WinInet;

procedure TForm1.Button1Click(Sender: TObject);
begin
  if InternetGetConnectedState(nil, 0) then ShowMessage('已连接');
end;

原创粉丝点击