Click here to Skip to main content
15,887,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I got a question about DPI issue with winforms applications.

I am having a winforms C# application, built with .NET 4.5.2 using VS 2013. Many of our customers are using Window 8 or 8.1 and Windows 10 and some of them are complaining about the DPI issue when they switch between laptop and big monitors. To solve this I have added the DPI Awareness section to my manifest file, but not solved the issue.

But still some issues are not solved. We could see issues with some user controls and also while creating OLE objects from our app to MS word (not getting the size of the objects properly).

I understand that this issue has been addressed with .NET 4.7 but unfortunately we don’t have a plan to upgrade this year. Could you please suggest some fixes or documents that I could follow to fix this? Thank you.

What I have tried:

Tried Manifest changes
HTML
<windowsSettings>

        <!-- Per Monitor V1 [OS >= Windows 8.1]

         Values: False, True, Per-monitor, True/PM -->

        <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">

          true/PM

        </dpiAware>

        <!-- Per Monitor V1 [OS >= Windows 10 Anniversary Update (1607, 10.0.14393, Redstone 1)]

         Values: Unaware, System, PerMonitor -->

        <!-- Per Monitor V2 [OS >= Windows 10 Creators Update (1703, 10.0.15063, Redstone 2)]

         Value: PerMonitorV2 -->

        <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">

          PerMonitorV2, PerMonitor

        </dpiAwareness>

</windowsSettings>
Posted
Comments
Ziee-M 8-Feb-18 8:19am    
Can you link an image ? Winform is old, but it certainly is relaible. application such Visual studio, Sql server, Outlook... are developped using winforms and yet no DPI problems

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900