Open forms change size when closing another

1

I have forms of type fsMDIChild that are set to initialized maximized ( wsMaximized ). They open normally, however when I close some of them the others change their status to WsNormal .

I would like to know if you can avoid this, even if you force the size to not change.

Insertion code for forms:

  if not Assigned(frmfornecedor) then
  begin
     frmfornecedor := tfrmfornecedor.create(frmPrincipal);
  end;

In the event OnClose of the forms there is only a Close and nothing else.

    
asked by anonymous 30.01.2015 / 22:08

1 answer

1

This should have been caused due to some change in the properties of the form FrmFornecedor because I could not reproduce this problem, check that the AutoSize property is marked as False .

In event OnClose() of form FrmFornecedor instead of using Close , use:

procedure TFrmFornecedor.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
    
31.01.2015 / 14:09