procedure TMainForm.NServerConClick(Sender: TObject);
var
connectForm: Tconnection;
i: Integer;
begin
for i:=0 to MDIChildCount-1do
//判断窗口是否已打开
if MDIChildren is Tconnection then
begin
MDIChildren.BringToFront;
Exit;
end;
connectForm := Tconnection.Create(Self);
connectForm.Show;
end;