Reputation: 820
I am currently developing an application in c# with .NET Framework 4.7 I have a problem with DPI scaling. On my computer I have two monitors, one with 150% scaling and another one with 100%. I added this code in my app manifest file:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
And it works perfectly fine.
i take the exe file and all its dependecies, take it to another computer who as only one screen with 100% scaling and the application doesn't look as it should do.
I hope you guys have a solution for me I am struggling since two days with this problem...
Upvotes: 1
Views: 321
Reputation: 820
Well, like every time I post my problem I figure out the solution a few moments later.
I removed the manifest file from the application and changed the AutoScaleMode
propertie to Dpi
instead of Font
for every form in my application.
And now it works like a charm.
Upvotes: 3