Win11 Scaling Issues with .NET 4 WinForms Application

The Master 20 Reputation points
2025-01-31T15:21:55.1666667+00:00

A WinForms application developed in .NET 4 is experiencing display issues when running on Windows 11 with a zoom level of 125%. The application does not properly support DPI scaling due to limitations in .NET 4. Attempts to use the Windows API function SetProcessDPIAware have not resolved the problem. What solutions are available to address these scaling issues?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,085 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,262 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,776 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jiale Xue - MSFT 48,861 Reputation points Microsoft Vendor
    2025-02-03T03:04:28.4233333+00:00

    Hi @The Master , Welcome to Microsoft Q&A,

    Since .NET 4 has very limited built-in support for DPI scaling, common techniques (such as calling SetProcessDPIAware) will not produce the expected results.

    For earlier .NET you can use the manifest to add support for DPI, but the support is limited, it is recommended that you upgrade to 4.7+.

    <application xmlns="urn:schemas-microsoft-com:asm.v3">
      <windowsSettings>
        <dpiAwareness>PerMonitorV2</dpiAwareness>
      </windowsSettings>
    </application>
    

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.