Log in

View Full Version : [ask]Delphi, cek koneksi internet


Badguy13
20th November 2011, 10:01 AM
Gan mohon bantuannya doong




Code:

procedure TForm1.Button1Click(Sender: TObject);
begin
IdIcmpClient1.Ping('8.8.8.8');
end;

procedure TForm1.IdIcmpClient1Reply(ASender: TComponent;
const AReplyStatus: TReplyStatus);
begin
if AReplyStatus.ReplyStatusType=rsEcho then ShowMessage('ok') else ShowMessage('Check your connection')
end;

tadinya pake code itu

tapi masalahnya pas dicobain, selalu bilang ok

padahal udah cabut modem, udah ga ada koneksi sama sekali, tapi tetep aja bilangnya OK.



atau code ane buat diatas ada yang salah, mohon koreksinya gan,,,

</div>