pcplayer ·
·
阅读: 365
我用以下代码测试过,没问题。
procedure TForm1.Button1Click(Sender: TObject);
begin
IdTCPServer1.Active := False;
IdTCPServer1.DefaultPort := StrToInt(Edit1.Text);
IdTCPServer1.Active := True;
if IdTCPServer1.Active = True then
Memo1.Lines.Add('打开端口成功');
end;