Вниз
Скачать: CL | DM;

Whois   Найти похожие ветки 

 
Exit   (2006-08-03 22:38) [0]

Учусь работать в сети и у меня не выходит следующий код
unit Unit1;

interface

uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
 IdWhois;

type
 TForm1 = class(TForm)
   Edit1: TEdit;
   Button1: TButton;
   ResultMemo: TMemo;
   IdWhois1: TIdWhois;
   procedure Button1Click(Sender: TObject);
 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
Line,FindResult: string;
iPos: Integer;
begin
ResultMemo.Clear; //Очистка содержимого компонента TMemo
FindResult:=IdWhois.Whois(Edit1.Text); //Запускаем поиск
//Дальше идет форматирование полученной информации
while Length(FindResult) > 0 do
begin
iPos := Pos(#10, FindResult);
Line := Copy(FindResult, 1, iPos - 1);
ResultMemo.Lines.Add(Line);
Delete(FindResult, 1, Length(Line)+1);
end;
end;

end.

Выдаёт ошибку

[Error] Unit1.pas(36): E2003 Undeclared identifier: "Whois"
[Fatal Error] Whols.dpr(5): F2063 Could not compile used unit "Unit1.pas"


 
S@shka ©   (2006-08-03 22:46) [1]

IdWhois.Whois(Edit1.Text)

А так нельзя писать. С чего ты вдруг полез руками в IdWhois.pas ???

FindResult:=IdWhois1.Whois(Edit1.Text)  - видимо вот так


 
Exit   (2006-08-03 22:49) [2]

S@shka Спасибо, как то не заметил!



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.03 c
15-1151261024
VirEx
2006-06-25 22:43
2006.08.27
JDMClient


15-1154075759
Separator
2006-07-28 12:35
2006.08.27
Посоветуйте почтовый сервер под Windows


2-1154696449
BVV
2006-08-04 17:00
2006.08.27
Как избавиться от представления чисел в виде *...*Е*..*?


2-1154931678
alles
2006-08-07 10:21
2006.08.27
Можно убрать иконку форме MDIChild?


2-1155146075
merri
2006-08-09 21:54
2006.08.27
VarArrayCreate




   Наверх