Kod: Tümünü seç
procedure TForm1.Button1Click(Sender: TObject);
begin
if IdIPWatch1.IsOnline then
ShowMessage('Bağlı')
else
ShowMessage('Bağlı değil');
end;
Kod: Tümünü seç
procedure TForm1.Button1Click(Sender: TObject);
begin
if IdIPWatch1.IsOnline then
ShowMessage('Bağlı')
else
ShowMessage('Bağlı değil');
end;
Kod: Tümünü seç
uses
wininet;
Kod: Tümünü seç
function Internetvarmi: Boolean;
const
INTERNET_CONNECTION_MODEM = 1; // local system uses a modem to connect to the Internet.
INTERNET_CONNECTION_LAN = 2; // local system uses a local area network to connect to the Internet.
INTERNET_CONNECTION_PROXY = 4; // local system uses a proxy server to connect to the Internet.
INTERNET_CONNECTION_MODEM_BUSY = 8; // local system's modem is busy with a non-Internet connection.
var
dwConnectionTypes: DWORD;
begin
dwConnectionTypes :=
INTERNET_CONNECTION_MODEM +
INTERNET_CONNECTION_LAN +
INTERNET_CONNECTION_PROXY;
Result := InternetGetConnectedState(@dwConnectionTypes, 0);
end;