OnStatus 事件中判断AStatus或AStatusText

解决方案 »

  1.   

    我不插网线这个错误无法捕捉procedure TbdComThread.Execute;
    begin
      { Place thread code here }
      FreeOnTerminate :=true;  While b_EnRead do
      begin
        if Terminated then Break ;
         with frm_Main do
         begin
            if not IdTCPClient_MW100.Connected then
            begin
              try
                frm_Main.IdTCPClient_MW100.Connect(5000);
                b_Suc :=True ;
                Synchronize(buildCom);
              except
                b_Suc:=False ;
                b_EnSend :=True ;
                Synchronize(buildCom);
                IdTCPClient_MW100.Disconnect ;
              end;
            end;
         end;
      end;
    end;我现在这么写自动连接代码的
      

  2.   

    我一般是用TTcpClient 和TTcpServer