我用Indy的TidTcpServer接收客户端发送过来的命令,
用procedure TData.TCPServerExecute(AThread: TIdPeerThread);
var stype:string;
begin
if not AThread.Terminated and AThread.Connection.Connected then
begin
stype:=AThread.Connection.ReadString();
if stype='ABC' then
form2.show;
end;
end;
只要运行到form2.show;这一句就死掉了,要结束任务才行,要怎样才能显示这个窗口啊
用procedure TData.TCPServerExecute(AThread: TIdPeerThread);
var stype:string;
begin
if not AThread.Terminated and AThread.Connection.Connected then
begin
stype:=AThread.Connection.ReadString();
if stype='ABC' then
form2.show;
end;
end;
只要运行到form2.show;这一句就死掉了,要结束任务才行,要怎样才能显示这个窗口啊
如果这样的话就成死循环了....
空岛:能写个具体例子看看吗?
1.去掉from.show或者替换成别的看是否会死掉.
2.如果是,看你的from.show里面有什么特殊的操作没,可能是这个问题.在TCPServerExecute不值得提倡
1.去掉from.show或者替换成别的看是否会死掉.
2.如果是,看你的from.show里面有什么特殊的操作没,可能是这个问题.在TCPServerExecute里面对窗体进行操作不值得提倡.