I want to use Per Monitor DPI Awareness with my 10.4 app. Building the project with FB8 I notice that, unless I use the ‘Include manifest file in resources’ option in the Compile action (ie, a custom manifest), the manifest xml isn’t included on the executable’s resources and, therefore, there is no DPI Awareness in the app - irrespective of the settings in Project>Options>Manifest.ie, automatic or custom. If I build from within the IDE and the setting is ‘Auto Generate’, the manifest xml is included in the exe and all works correctly. I see you recommend always using a custom manifest file, but it seems as though one has to be used when building with FB8. Is that correct? My knowledge of this area is limited, so I may have got the wrong edge of the stick!
Further testing with Resource Compiler 'Compile project resources (D2009 or later) checked seems to make no difference; the 10.4 ‘Auto Generated’ manifest xml is still not included in the exe’s resources. I can’t find an ‘Auto Generated’ manifest file anywhere in my project folder (or anywhere else for that matter) to use and so I have to use a custom manifest file in FB8 to get DPI Awareness.
Hi Andrew
The Auto generate option basically tells the msbuild to use a template to generate a manifest when compiling the resource file (the template is typically $(BDS)\bin\default_app.manifest )
FinalBuilder doesn’t use MSBuild so you must tell it where the manifest file is. There are a few ways to achieve this.
- Manually specify the manifest file in FinalBuilder.
Note that if you use the same value as the IDE does for the Auto generate option, it would be
$(BDS)\bin\default_app.manifest
however this will fail to compile, because FinalBuilder doesn’t know that this is a template or how to process it. So you need to specify a complete manifest file. The simplest way to do this is using option 2
- If you have compiled the project in the IDE at least once, use the button next to the project file
This will extract the manifest file from the project.res file to projectmanifest.xml and update the setting in FinalBuilder. You should add that manifest file to your version control.
Note that I still recommend using a custom manifest file for the reasons outlined here
https://www.finalbuilder.com/resources/blogs/windows-manifest-files
Thanks Vincent, I understand the issue now.
Best, Andrew