hvis det er online via internettet (og ikke bare via LAN) så kan du bruge denne funktion hvis du har Indy:
function TForm1.ConnectedToInternet:Boolean;
var
Http:TStringList;
IdHTTP:TIdHTTP;
i:Integer;
begin
Result := False;
//Adding some few website that would be online (the should never be down)
Http := TStringList.Create;
Http.Add('http://www.dyndns.com/');
Http.Add('http://www.myip.dk/');
Http.Add('http://www.microsoft.com/');
//
IdHTTP := TIdHTTP.Create(Self);
for i:=0 to Http.Count-1 do
begin
try
if IdHTTP.Get(Http[i]) <> '' then
begin
Result := True;
Exit;
end;
except
end;
end;
end;