High DPI issues

Posted by: info on 27 October 2019, 10:16 pm EST

  • Posted 27 October 2019, 10:16 pm EST

    A lot of work still seems to be needed to support high dpi.

    I’ve noticed that the scrollbars and also the tabs do not resize as expected.

    It seems to me that I have already set the correct settings.

    Have I missed something?

    Thanks in advance

    PietF

  • Posted 29 October 2019, 10:36 pm EST

    Hi,

    Although this is a known issue, can you please post screenshots (along with dpi settings you’re using) of the issues you’re having so that we can make sure that we are considering them also (if not already).

    Thanks,

    Jitender

  • Posted 30 October 2019, 5:15 am EST - Updated 30 September 2022, 4:41 am EST

    Hi Jitender,

    Here is the screenshot you wanted.

    I’m using 192 dpi here (200% on a 4k screen)

    Forgot to mention earlier, I’m using version 12.45.20193

    Environment: Docking windows

    Hope you can save my project.

    Kind Regards

    PietF

  • Posted 31 October 2019, 6:01 pm EST

    Hi,

    Have you tried using the settings described on this page?:

    http://help.grapecity.com/spread/SpreadNet12/WF/webframe.html#spwin-dpisupport.html

    When these settings are used with the latest Spread version, I don’t see any issues with the scroll bar and sheet tabs.

  • Posted 1 November 2019, 12:31 am EST

    Hi Jitender,

    If the system handles high dpi you will end up with fuzzy text etc.

    With the high dpi declaration also in the manifest file you will end up with oversized windows and which is worse, pixulated text. (but the scrollbars seems to be okay)

    Therefore Microsoft strongly advices to move the dpi aware declarations to the app.config file.

    When you remove the declaration from of the manifest file then all elements - text included - suddenly are crystal clear.

    The only drawback of that setting is that parts - like the scrollbar - of spread do not scale correct.

    How are we going to solve this?

    Kind regards,

    PietF

  • Posted 3 November 2019, 3:18 pm EST

    Hi,

    Can you please post a small sample which shows how you’re currently using it so that we can look into this further?

    Thanks,

    Jitender

  • Posted 4 November 2019, 5:42 am EST

    Hi Jitender,

    tried to attach a (really) small project but the zip file seems to be to big.

    However, I have noticed that when you change the default skin from ‘none’ to one in the list, the scroll bars etc. no longer scale.

    So it seems that we can no longer use skins.

    Kind regards,

    PIetF

  • Posted 4 November 2019, 4:02 pm EST

    Hi,

    You can delete the ‘bin’, ‘obj’, and the hidden ‘.vs’ folder to reduce the size.

    Regarding the scroll bar size when a skin is applied, since this also works correctly with the settings mentioned in documentation, I would like to try it with your settings before suggesting anything. So, please try attaching it again after deleting the unnecessary folders.

    Regards,

    Jitender

  • Posted 4 November 2019, 7:30 pm EST

  • Posted 6 November 2019, 2:54 pm EST

    Hi,

    Thanks for the sample. From the sample I can see that the scroll bar is not scaled when its height is set.

    We’ve reported it to the developers [Internal Tracking ID: 277363].

    I’ll let you know once we receive more information on this.

  • Posted 7 November 2019, 10:33 pm EST

    Hi,

    Spread will only scale the scroll bars if they have the default height/width (-1). Since in your sample vertical scroll bar’s height is set to 16, Spread uses that height only.

    If you want Spread to scale the scroll bars correctly, you should keep the default height/widths.

    Regards,

    Jitender

  • Posted 7 November 2019, 11:49 pm EST

    Hi Jitender,

    at my end that does not work either. I’ve already tried that.

    Set the height back to -1 and drag the form from a 96 dpi screen to a (4k) high dpi screen.

    You will see that the scrollbars still do not scale.

    Kind regards,

    PietF

  • Posted 10 November 2019, 6:08 pm EST

    Hi,

    I tried dragging from a normal dpi screen to a high dpi screen but the scroll bars were scaled correctly (with the default heights).

    However, I did notice an issue with the scaling behavior; the scroll bars were not visible on the screen with normal dpi when the form was dragged again (since the same dpi is used for subsequent invocations of pPerformDpiScaling method).

    If you change line 50 in the sample you attached (oldDpi = currentDpi) to “oldDpi = DeviceDpi”, this issue is fixed.

    As for the original issue, do the scroll bars still look like as in your attached screenshot (your second post on this thread)? If not, can you please show what it looks like now?

    Thanks,

    Jitender

  • Posted 10 November 2019, 9:16 pm EST - Updated 30 September 2022, 4:41 am EST

    Hi Jitender,

    I’m using the default height/width for the scrollbars.

    But I’m also using DefaultSkin = “Office2013”.

    I’ve attached an image about what it looks now. (dpi = 192px)

    Kind regards,

    PietF

  • Posted 12 November 2019, 3:48 pm EST - Updated 30 September 2022, 4:41 am EST

    Hi,

    I don’t see such an issue at my end. See attached screenshot:

    Also, from your screenshot it seems that your child form is not scaled correctly (the font used in the title of tab pages look like they are still at 100% DPI, same with the “File” in the menu strip).

    Can you please see if I’m missing anything else? I used the same sample you attached earlier (with ‘Office2013’ as the default skin).

    Regards,

    Jitender

  • Posted 12 November 2019, 9:11 pm EST

    Hi Jitender,

    My form does not scale correct because Windows does not recognize an inherited form at once. I have not yet handled that in code.

    If I add a child window in high dpi Windows scales correctly but Spread stays on 96 dpi.

    I wonder, did you alter the config file so that Windows handles the scaling now?

    Kind regards,

    PietF

  • Posted 12 November 2019, 9:32 pm EST

    Hi,

    I used the same config file from your sample. Here’s the relevant snippet from the config file:

    <System.Windows.Forms.ApplicationConfigurationSection>
          <add key="DpiAwareness" value="PerMonitorV2" />
          <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
          <!--<add key="EnableWindowsFormsHighDpiAutoResizing" value="false" />-->
          <!--tbv FarPoint-->
          <add key="Form.DisableSinglePassScalingOfDpiForms" value="true"/>
          <!--<add key="ToolStrip.DisableHighDpiImprovements" value="true"/>
              <add key="CheckedListBox.DisableHighDpiImprovements" value="true"/>
              <add key="MonthCalendar.DisableHighDpiImprovements" value="true"/>
              <add key="AnchorLayout.DisableHighDpiImprovements" value="true"/>
              <add key="DataGridView.DisableHighDpiImprovements" value="true"/>-->
        </System.Windows.Forms.ApplicationConfigurationSection>
    

    Regards,

    Jitender

  • Posted 13 November 2019, 2:54 am EST

    Well Jitender, then I think I’m out of luck because it doesn’t work for me.

    Can I conclude that the (Windows) system of scaling is not reliable and very dependent on the environment in which you work?

    So stay far away to avoid problems with customers?

    Kind regards,

    PietF

  • Posted 13 November 2019, 9:08 pm EST

    Hi,

    We would like to request some more information from you. I’ve created a case for you on our private support website (http://supportone.componentone.com/home/casedetail/407334), so please continue the case there.

    Thanks,

    Jitender

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels