How to activate "disable display scaling at high dpi settings" programmatically

I am developing a Windows form application using C # in Visual Studio 2010. I found that this application scales if I used a high resolution display setting. But if I activate the file property "disable display scaling at high settings per inch" using the right-click mouse menu in Windows Explorer, it seems that it does not scale.

Is there a way to activate "disable display scaling at high dpi" programmatically in Visual Studio 2010 C # or in the upper version?

I tried to install the application manifest file, but have not configured it yet.

+4
source share
1 answer

Using the manifest file (app.manifest in a Visual C # project) resolved this issue for me. For instance:

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

Of course, this should be inside your main build section.

PS I checked this when debugging GitExtensions.

PPS I understand that the question is old, but maybe someone still needs information.

Update: however, this can lead to automatic unwanted resizing of components in the form of a window.

+2
source

All Articles