none
Winform application that is DPI-aware under Windows XP

    Question

  • Dear everyone,

               I wish to confirm a question: is there any way to make a winform application DPI-aware and not automatically scaled by Windows XP at higher DPIs? Is it possible for a winform application to have at least system DPI awareness mode?

               Is there any third-party UI control toolkit that can achieve this goal?

               Thank you very much and best regards! 


    HUANG Huan

    Monday, February 11, 2019 4:36 AM

Answers

All replies

  • Hi HUANG Huan,

    You asked about DPI-Aware, and I suppose you must have had a solution.
    cursor customization for different DPI settings

    Why don't you use/add an app.manifest file?

    Regards,

    Ashidacchi -- https://ssl01.rocketnet.jp/hokusosha.com/default.html

    Monday, February 11, 2019 7:38 AM
  • Dear Ashidacchi,

              In my previous post cursor customization for different DPI settings,  I was asking about cursor in dpi-independent applications, because I hadn't found documentation in this area.  Now I am asking another question. From MSDN online documentation, it seems that Windows XP is DPI-unaware. I am not sure and wonder there is any way to achieve DPI-awareness. I wish to achieve the same effect in Windows XP as in later Windows systems. Thank you!


    HUANG Huan

    Monday, February 11, 2019 8:29 AM
  • Dear HUANG Huan,

    Sorry for my confusion. 
    As far as I know, Windows XP cannot be DPI-aware.
    If you want to make your application DPI-aware-like in Windows XP, I'm afraid, you need to know DPI of a target machine and re-calculate size of all components in a form. (also need to adjust location of all components)

    I know nothing about your application and environment where it runs. Would you provide your needs or environment?

    Regards,

    Ashidacchi -- https://ssl01.rocketnet.jp/hokusosha.com/default.html


    • Edited by Ashidacchi Monday, February 11, 2019 8:46 AM
    Monday, February 11, 2019 8:39 AM
  • Dear Ashidacchi,

                 Thank your for your support. I am trying to create a desktop application that could run on all Windows Systems from Windows XP to Windows 10. The reason that I want to cover Windows XP is that in my countries there are still a lot of machines running XP. I plan to use winform GUI for Windows XP and possibly Windows Server 2003, and use WPF for systems from Windows Vista to Windows 10. As far as I know WPF could achieve DPI-awareness, i.e. sharpness of fonts and controls despite the system DPI setting. I also wish to achieve the achieve the same effect under Windows XP, but this seems impossible. It seems that Windows XP will always use bitmap stretching to scale the GUI according to the system DPI setting and thus will cause the GUI elements to become blurry. Even if I resize the component size in my program and make the GUI the same size over different machines, the blurring caused by system bitmap stretching is unavoidable. So winform under Windows XP can't have the same sharpness as WPF under newer Windows systems.

                   Am I correct? I wish to hear your opinion.

                   Thank you and best regards!

                                     HUANG Huan

     


    HUANG Huan

    Monday, February 11, 2019 9:49 AM
    • Marked as answer by HUANG Huan Tuesday, February 12, 2019 5:54 AM
    Monday, February 11, 2019 9:59 AM
  • Dear HUANG Huan,

    Thank you for information.  I can understand your situation.
    I have no XP machines (physical machines), have a virtual XP machine viewed on 4K monitor (host/physical machine: 125 %). So, I cannot see how it looks, blur or not.

    I'd confirm:
    (1) about monitor on Windows XP: resolution (width x height) and DPI
    (2) target version of .NET Framework in your application, and installed version in XP machine

    Regards, (sorry, my poor English)

    Ashidacchi -- https://ssl01.rocketnet.jp/hokusosha.com/default.html


    • Edited by Ashidacchi Monday, February 11, 2019 10:27 AM
    Monday, February 11, 2019 10:21 AM
  • Thank you for your information. They are very useful!

     

    HUANG Huan

    Monday, February 11, 2019 12:08 PM
  • Dear Ashidacchi,

                   Thank you! I think I am sure now Windows XP cannot achieve DPI-awareness, so I can only accept that my program under XP will not reach the same visual quality as that under later Windows systems.

                    Best regards,


    HUANG Huan

    Monday, February 11, 2019 12:12 PM