Autor Beitrag
aM0xACiLLiN
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64



BeitragVerfasst: Di 20.04.04 06:12 
Hi,

in meiner MDI-anwendung verwende ich auf dem child-formular TIdTCPClient. Jetzt frage ich mit folgendem code nach neuen daten:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
procedure TForm2.ConnectToServer;
var t,buffer:string;
begin
with cs do begin
 try
  try
   Connect;
   IdAntiFreeze1.IdleTimeOut:=0;
   while Connected do begin
    try
     buffer:=ReadLn;
     DebugLog('('+TForm2(owner).name+')<- '+buffer);
     if (length(buffer) > 0) then ParseMessage(TForm2(owner),buffer);
    except
     IdAntiFreeze1.IdleTimeOut:=250;
     break;
    end;
   end;
  except
   on E: Exception do Showmessage(E.Message);
  end;
 finally
  if (connected) then Disconnect;
 end;
end;
end;


Schließe ich allerdings ein beliebiges MDIChild wird auf ALLEN anderen der IdTCPClient disconnected :(
wie kann ich das unterbinden? ich dachte komponenten sind standardmäßig abhängig vom formular..
Als ich noch TClientSocket benutzt hab', ging's..

cu