我在用Timer1做接收程序时。怎么样判断用户是用发信息过来。当没发信息过来时,我们就不做下面的操作。代码如下:
procedure TForm1.Timer1Timer(Sender: TObject);
var
Com,
Msg : String;
begin
if not IdTcpClient1.Connected then
exit; Msg := IdTCPClient1.ReadLn('', 5);end;
使用这段代码为死在那里为什么啊!!
procedure TForm1.Timer1Timer(Sender: TObject);
var
Com,
Msg : String;
begin
if not IdTcpClient1.Connected then
exit; Msg := IdTCPClient1.ReadLn('', 5);end;
使用这段代码为死在那里为什么啊!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货