After Windows 7, each execut the IDR, we find the controls position will changed.
Reason:
After Windows 7, has a display setting under the Desktop popup menu -> Display Settings:
"Change the size of text, apps and other items"
This can select: Smaller (100%), Medium (125%), Larger (150%), and so on.
Solve:
Modify the ScaleForm function in Misc.cpp
void __fastcall ScaleForm(TForm* AForm)
{
HDC _hdc = GetDC(0);
if (_hdc)
{
//Modified by ZGL
int LogicalScreenHeight = GetDeviceCaps(_hdc, VERTRES);
int PhysicalScreenHeight = GetDeviceCaps(_hdc, DESKTOPVERTRES);
AForm->ScaleBy(PhysicalScreenHeight, LogicalScreenHeight);
//Modified end
ReleaseDC(0, _hdc);
}
}
After Windows 7, each execut the IDR, we find the controls position will changed.
Reason:
After Windows 7, has a display setting under the Desktop popup menu -> Display Settings: "Change the size of text, apps and other items" This can select: Smaller (100%), Medium (125%), Larger (150%), and so on.
Solve:
Modify the ScaleForm function in Misc.cpp
void __fastcall ScaleForm(TForm* AForm) { HDC _hdc = GetDC(0); if (_hdc) { //Modified by ZGL int LogicalScreenHeight = GetDeviceCaps(_hdc, VERTRES); int PhysicalScreenHeight = GetDeviceCaps(_hdc, DESKTOPVERTRES); AForm->ScaleBy(PhysicalScreenHeight, LogicalScreenHeight); //Modified end ReleaseDC(0, _hdc); } }