procedure TForm1.ToolButton5Click(Sender: TObject);
begin
with dm.cmpq do begin
first;
while not eof do begin
sendon;//自定义过程
pudpDataReceived(Sender: TComponent; NumberBytes: Integer;FromIP: String; Port: Integer);//就是这儿不能调用。
//////////////////////////////////
/// 加上下面的语句试试:
sleep(1000);
////////////////////////
next;
end;
end;
end;
begin
with dm.cmpq do begin
first;
while not eof do begin
sendon;//自定义过程
pudpDataReceived(Sender: TComponent; NumberBytes: Integer;FromIP: String; Port: Integer);//就是这儿不能调用。
//////////////////////////////////
/// 加上下面的语句试试:
sleep(1000);
////////////////////////
next;
end;
end;
end;
[Error] Unit1.pas(323): Incompatible types: 'TComponent' and 'TObject'
[Error] Unit1.pas(323): Undeclared identifier: 'NumberBytes'
[Error] Unit1.pas(323): ':=' expected but ':' found
[Error] Unit1.pas(323): ':=' expected but ':' found
[Error] Unit1.pas(323): ')' expected but ':' found
[Error] Unit1.pas(324): Missing operator or semicolon[Fatal Error] jkserver.dpr(14): Could not compile used unit 'Unit1.pas'
你要把相应的参数填进去啊~
property OnDataReceived: TOnReceive;Description
The OnDataReceived event is called when data is received from the remote hostEvent Parameters:
The NumberBytes parameter specifies the number of incoming bytes.
The FromIP parameter specifies the IP address of the computer that sent the data.
The Port property specifies which port the data was sent from.
[Error] Unit1.pas(71): INDEX, READ or WRITE clause expected, but ';' found
[Error] Unit1.pas(72): READ or WRITE clause expected, but identifier 'private' found
[Fatal Error] Unit1.pas(85): Could not compile used unit 'Unit8.pas'