Показать сообщение отдельно
  #12  
Старый 14.08.2010, 22:06
harbor harbor вне форума
Новичок
 
Регистрация: 15.01.2010
Сообщения: 83
Репутация: 10
По умолчанию

ну все, победил. такой код нормально обрабатывает

Код:
var
  Form1: TForm1;
  http:TidHttp;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
http:=TIdHTTP.Create(Self);
 try
 http.Get(Edit2.Text);
 if http.ResponseCode=200 then begin

 Edit1.Text:='Connected'; end else Edit3.Text:='иначе'+IntToStr(http.ResponseCode);
 except
  Edit3.Text:='Not Connected '+IntToStr(http.ResponseCode);
 end;
http.Free;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Text:='--';
Edit3.Text:='--';
end;

end.
Ответить с цитированием