C
Carem
Unregistered / Unconfirmed
GUEST, unregistred user!
原本在delphi5下,用ClientSocket可以用以下语句编译,但是现在用了d7,里面的ClientSocket
分成了tcpclient和tcpserver,
1。我是否应该用tcpclient代替?
2。相应的语句应该对应d7里面的tcpclient的那个事件?
3。是否还要增加什么语句么?
4。那里有d7的tcpclient中文资料?(help里面的不详细)
procedure TForm1.ClientSocket1Connecting(Sender: TObject;
Socket: TCustomWinSocket);
begin
memo1.lines.add('正在连接。。。。');
end;
procedure TForm1.ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
begin
ClientSocket1.close;
memo1.lines.add('已经连接。'+s);
end;
procedure TForm1.ClientSocket1Error(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
ClientSocket1.close;
errorcode:=0;
end;
procedure TForm1.ClientSocket1Disconnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
memo1.lines.add('连接断开。'+s);
end;
分成了tcpclient和tcpserver,
1。我是否应该用tcpclient代替?
2。相应的语句应该对应d7里面的tcpclient的那个事件?
3。是否还要增加什么语句么?
4。那里有d7的tcpclient中文资料?(help里面的不详细)
procedure TForm1.ClientSocket1Connecting(Sender: TObject;
Socket: TCustomWinSocket);
begin
memo1.lines.add('正在连接。。。。');
end;
procedure TForm1.ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
begin
ClientSocket1.close;
memo1.lines.add('已经连接。'+s);
end;
procedure TForm1.ClientSocket1Error(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
ClientSocket1.close;
errorcode:=0;
end;
procedure TForm1.ClientSocket1Disconnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
memo1.lines.add('连接断开。'+s);
end;