我在用Timer1做接收程序时。怎么样判断用户是用发信息过来。当没发信息过来时,我们就不做下面的操作。代码如下:
 procedure TForm1.Timer1Timer(Sender: TObject);
var
  Com,
  Msg : String;
begin
  if not IdTcpClient1.Connected then
    exit;  Msg := IdTCPClient1.ReadLn('', 5);end;
使用这段代码为死在那里为什么啊!!