Ver Mensaje Individual
  #4  
Antiguo 05-05-2008
Paulao Paulao is offline
Miembro
 
Registrado: sep 2003
Ubicación: Rua D 31 Casa 1 - Inhoaíba - Rio de Janeiro - RJ - Brasil
Posts: 637
Reputación: 23
Paulao Va por buen camino
Yo tengo una funcion que pongo en el cretae del form child, para yo hacer un control del Heigth y width del mismo. La funcion estas abajo:

Cita:
procedure Centraliza(iWidth, iHeight: Integer);
begin
Width := iWidth;
Height := iHeight;

Left := StrToInt(FloatToStr(Int(StrToFloat(IntToStr(Screen.Width - iWidth)) / 2 )));
Top := StrToInt(FloatToStr(Int(StrToFloat(IntToStr(Screen.Height - iHeight)) / 15 )));
end;
Y el uso de la funcion, hago en el Create del form asi:

Cita:
Centraliza(715,394);
Mira, la linea top si el form no queda centralizado, usted va aumentando o diminuindo la division, por ejemplo, en mi caso yo hizo por 15, pues el width es grande. Si fuer un width, ejemplo, 315, talvez yo hiciera por 8 o 10. Ud tendra que ir tetando.
Responder Con Cita