Pesquisar na Comunidade
Mostrando resultados para as tags ''mdi''.
Encontrado 1 registro
-
Gostaria de saber como faço para centralizar os formulários mdi child no formulário mdi pai, já tentei posceerncenter e o código abaixo mas não consigo, abraços. procedure TFormFilho.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); var Rect: TRect; OurWidth: Integer; OurHeight: Integer; begin if Showing then begin // Obtem o retângulo da área cliente MDI Windows.GetWindowRect(Application.MainForm.ClientHandle, Rect); // Calcular largura e altura da área cliente OurWidth := Rect.Right - Rect.Left; OurHeight := Rect.Bottom - Rect.Top; // Calcula a nova posição ALeft := (OurWidth - Width) div 2; ATop := (OurHeight - Height) div 2; end; inherited SetBounds(ALeft, ATop, AWidth, AHeight); end;