Una Alternativa a lo yo entendi de tu problema podria ser esta, que ZOOM de tu forma,
esta dimensiona todo los controles según aumenten o disminuya su tamaño.
Este tema fue discutido y chequeado en otro foro y funciona perfectamente.
Prueba y me cuentas.
#include<memory>
#include <Inifiles.hpp>
void __fastcall RegistrarControles(TWinControl *F);
void __fastcall AcomodarControles(TWinControl *F);
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
RegistrarControles(this);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormResize(TObject *Sender)
{
AcomodarControles(this);
}
//---------------------------------------------------------------------------
// FUNCION
//---------------------------------------------------------------------------
void __fastcall RegistrarControles(TWinControl *F)
{
//
// Funcion registrada para realizar zoom in-out
//
AnsiString asResize = ExtractFilePath(Application->ExeName) +
F->Name.Trim()+".ini";
std::auto_ptr<TIniFile> pIni(new TIniFile(asResize));
TControl *pControl;
float ccLeft,ccHeight,ccTop,ccWidth;
for(int control = 0; control <F->ComponentCount; control++)
{
Application->ProcessMessages();
if (F->Components[control]->InheritsFrom(__classid(TControl)))
{
Application->ProcessMessages();
pControl = dynamic_cast<TControl*>(F->Components[control]);
// sacamos los porcentajes
ccTop = ( pControl->Top * 100 ) / F->Height;
ccLeft = ( pControl->Left * 100 ) / F->Width;
ccHeight = ( pControl->Height * 100 ) / F->Height;
ccWidth = ( pControl->Width * 100 ) / F->Width;
// grabamos en Archivo de Configuracion
pIni->WriteFloat(pControl->Name,"Top",ccTop) ;
pIni->WriteFloat(pControl->Name,"Left",ccLeft) ;
pIni->WriteFloat(pControl->Name,"Width",ccWidth) ;
pIni->WriteFloat(pControl->Name,"Height",ccHeight) ;
}
}
pIni->UpdateFile();
}
//---------------------------------------------------------------------------
void __fastcall AcomodarControles(TWinControl *F)
{
//
// Funcion registrada para realizar zoom in-out
//
AnsiString asResize = ExtractFilePath(Application->ExeName) +
F->Name.Trim()+".ini";
std::auto_ptr<TIniFile> pIni(new TIniFile(asResize));
TControl *pControl;
float ccLeft,ccHeight,ccTop,ccWidth;
for(int control = 0; control <F->ComponentCount; control++)
{
if (F->Components[control]->InheritsFrom(__classid(TControl)))
{
Application->ProcessMessages();
pControl = dynamic_cast<TControl*>(F->Components[control]);
// recuperamos los porcenajes en relacion al form
ccTop = pIni->ReadFloat(pControl->Name,"Top",ccTop);
ccLeft = pIni->ReadFloat(pControl->Name,"Left",ccLeft) ;
ccWidth = pIni->ReadFloat(pControl->Name,"Width",ccWidth) ;
ccHeight= pIni->ReadFloat(pControl->Name,"Height",ccHeight) ;
pControl->Left = (ccLeft * F->Width) / 100 ;
pControl->Top = (ccTop * F->Height) / 100 ;
pControl->ClientWidth = (ccWidth * F->Width) / 100 ;
pControl->ClientHeight = (ccHeight * F->Height) / 100 ;
}
}
}
//---------------------------------------------------------------------------