Jump to content

Mark Billig

Members
  • Content Count

    11
  • Joined

  • Last visited

Posts posted by Mark Billig


  1. I have a program that uses TeeChart and when recompiled with Delphi 12.1 the font size of the left and bottom axis labels are larger.  Everything else seems fine and I can fix it by adding code to change the font.  Any ideas what has caused this?

     

    Thanks, Mark


  2. 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%

    APS-Work.thumb.JPG.79a05dc80a8ee17c198b117577ccf1c3.JPG

     

    Computer scale set at 150%

    APS-Home.thumb.PNG.388bfc82a36e9a97f6587c898956139e.PNG


  3. I got tired of positioning applications on my remote screen.  With RDP's full bar that appears in the top center nicely covering Outlook's search window.  I decided I needed a tool to make it easier, APS.  To select the application that I want to gather position and size info from or position an application I borrowed a component comp.reticle.  I have it working but it is not scaling properly.  I am trying to modify comp.reticle to handle the changing DPI.

     

    image.thumb.png.c66e33f4da8d0c43e59d12a8c82c8ea2.png

     

    The targets on the left were placed in from the IDE designer.  The targets on the right were added at runtime.  I am trying to figure out why it is different with the same component.

×