Cita:
Empezado por borlandpablo
Pero date cuenta que si el programa lo realizo (por poner un ejemplo) en una pantalla de 800 x 600, cuando yo utilice el programa en una pantalla de 1024 x 768 y lo maximizo, tendría que tener en cuenta a qué resolución está. Lo que quiero decir es que tendré que variar el tamaño de algunos componentes según la resolución de cada pantalla.
Un saludo.
|
Para adaptar la presentación a diferentes resoluciones podés usar:
Código:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
int Ancho = 800, // Aqui los valores de la resolución
Alto = 600; // en que la aplicación es realizada
if(Screen->PixelsPerInch == 96){
Height = Height * Screen->Height / Alto;
Width = Width * Screen->Width / Ancho;
ScaleBy(Screen->Width, Ancho);
}
else if(Screen->PixelsPerInch == 120){
Height = Height * Screen->Height / Alto;
Height = Height + ((Height*15) / 100);
Width = Width * Screen->Width / Ancho;
Width = Width + ((Width*15) / 100);
ScaleBy(Screen->Width, Ancho);
Top = Top - 70;
Left = Left - 70;
}
else {
Height = Height * Screen->Height / Alto;
Width = Width * Screen->Width / Ancho;
ScaleBy(Screen->Width, Ancho);
}
}
Saludos.