Currently, I call SetProcessDPIAware() but the docs recommend using a manifest:
We recommended that you specify the default process DPI awareness via a manifest setting. While specifying the default via API is supported, it is not recommended.
Additionally, I find that on some machines calling SetProcessDPIAware()
causes the window title to disappear and reappear which causes the window to move down. I'm trying to have a persistent window position and this flicker is making my window slide down the screen after repeated runs.
How do I set dpi settings in the manifest in Visual Studio? How would I make premake generate a vcxproj with that setting?
How to run correctly with a high DPI setting? describes some of the answer I'm looking for, but the menus are different for C#.
To change in Visual Studio:
To change in premake, set dpiawareness inside your project block:
project( "ProjectName" )
kind "WindowedApp"
dpiawareness "HighPerMonitor"