一句话判断网络是否连接《转》
uses WinInet; procedure TForm1.Button1Click(Sender: TObject); begin if InternetGetConnectedState(nil, 0) then ShowMessage('已连接'); end;
uses WinInet; procedure TForm1.Button1Click(Sender: TObject); begin if InternetGetConnectedState(nil, 0) then ShowMessage('已连接'); end;