主题:帮忙看看为什么出错
下面代码运行时没有错误 为什么程序运行一段时间后会跳出错误
var
remotehost:string;
begin
remotehost:=inputbox('建立连接','请输入对方的I地址:','');
if trim(remotehost)<>'' then
if cs.Active then cs.active:=true;
cs.port:=4000;
cs.Host:= remotehost;
try
cs.active :=true;
showmessage('连接成功!');
except
showmessage('连接失败!');
end;
end;
var
remotehost:string;
begin
remotehost:=inputbox('建立连接','请输入对方的I地址:','');
if trim(remotehost)<>'' then
if cs.Active then cs.active:=true;
cs.port:=4000;
cs.Host:= remotehost;
try
cs.active :=true;
showmessage('连接成功!');
except
showmessage('连接失败!');
end;
end;