Thank you that helped. I tried to adjust the Width & Height of the WindowReticle component but it still does not look like the right size. Also is there a way to get the DPI variable from a system variable?
procedure TMainForm.AddGetSetFrame;
var
TmpDPI: Integer;
begin
TmpDPI := 96;
SetLength(GetSetFrameA, Length(GetSetFrameA) + 1);
GetSetFrameA[High(GetSetFrameA)] := TGetSetFrame.Create(FrameScrollBox);
with GetSetFrameA[High(GetSetFrameA)] do
begin
Parent := FrameScrollBox;
Top := High(GetSetFrameA) * Height + 5;
Align := alTop;
Name := 'GetSetFrame_' + IntToStr(High(GetSetFrameA));
Tag := High(GetSetFrameA);
PopupMenu := GSFramePopupMenu;
// Get
GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.Left := MulDiv(GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.Left, Screen.PixelsPerInch, TmpDPI);
GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.Top := MulDiv(GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.Top, Screen.PixelsPerInch, TmpDPI);
GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.Width := MulDiv(GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.Width, Screen.PixelsPerInch, TmpDPI);
GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.Height := MulDiv(GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.Height, Screen.PixelsPerInch, TmpDPI);
GetSetFrameA[High(GetSetFrameA)].GSGetWindowReticle.ScaleForPPI(TmpDPI);
// Set
GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.Left := MulDiv(GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.Left, Screen.PixelsPerInch, TmpDPI);
GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.Top := MulDiv(GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.Top, Screen.PixelsPerInch, TmpDPI);
GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.Width := MulDiv(GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.Width, Screen.PixelsPerInch, TmpDPI);
GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.Height := MulDiv(GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.Height, Screen.PixelsPerInch, TmpDPI);
GetSetFrameA[High(GetSetFrameA)].GSSetWindowReticle.ScaleForPPI(TmpDPI);
end;
end;
Computer scale set at 100%
Computer scale set at 150%