Dave Craggs 7 Posted October 4, 2023 I am having a strange problem with CTRL-A and edit fields. When the application is built from the IDE it CTL_A (select all) works. But it doesn't on my deployed application. This is built using FinalBuilder. Any ideas folks? Dave Craggs Share this post Link to post
Attila Kovacs 631 Posted October 4, 2023 (edited) Which Delphi version? I have a Ctrl-A patch unit in my Berlin but the only comment is that it's fixed in Tokyo 😄 edit: ok, it's something different from your issue. Edited October 4, 2023 by Attila Kovacs Share this post Link to post
Dave Craggs 7 Posted October 4, 2023 @Vincent ParrettHave you any thoughts on this? Share this post Link to post
Dave Craggs 7 Posted October 4, 2023 It works when built using the dev system, but not with finalbuilder. Reverts to old style open dialogs too. Share this post Link to post
PeterBelow 239 Posted October 4, 2023 Looks like the Finalbuilder version uses a different manifest or an ancient style falling back to an old version of the common dialogs DLL. I have no idea how that could influence Ctrl-A behaviour in edit controls, though; that is handled by the native Windows control, unless you have an action or such that traps the key... Share this post Link to post
Dave Craggs 7 Posted October 4, 2023 Bit confused about manifest. Delphi suggests it shod auto generate, but I can't find any. Share this post Link to post
Uwe Raabe 2064 Posted October 4, 2023 The FinalBuilder Action allows to specify a manifest, but it is not (yet) capable to build a new one from scratch. Seems you need to create one by yourself. Thankfully there is an article showing how to do it: https://www.finalbuilder.com/resources/blogs/windows-manifest-files Share this post Link to post
mvanrijnen 123 Posted October 4, 2023 (edited) to extract from existing executable use: Mt.exe - Win32 apps | Microsoft Learn "C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\microsoft.windows.sdk.buildtools\10.0.22621.755\bin\10.0.22621.0\x86\mt.exe" -inputresource:mydelphiprogram.exe -out:mydelphiprogram.manifest Edited October 4, 2023 by mvanrijnen Share this post Link to post
Dave Craggs 7 Posted October 4, 2023 24 minutes ago, Uwe Raabe said: The FinalBuilder Action allows to specify a manifest, but it is not (yet) capable to build a new one from scratch. Seems you need to create one by yourself. Thankfully there is an article showing how to do it: https://www.finalbuilder.com/resources/blogs/windows-manifest-files I did look at that, need to work out what values should be put into the manifest. Really don't know why I should need one 😞 Share this post Link to post
Anders Melander 1815 Posted October 4, 2023 29 minutes ago, Dave Craggs said: Bit confused about manifest. Delphi suggests it shod auto generate, but I can't find any. It's included in the .res file generated by Delphi so you can examine it with a resource editor. Share this post Link to post
Anders Melander 1815 Posted October 4, 2023 Just now, Dave Craggs said: Really don't know why I should need one Because the manifest controls the runtime environment where Windows execute your application. If your application doesn't have a manifest (internal or external), then Windows assumes that your application is completely clueless about the environment and gives you one where you can party like it's 1999. Apart from that, you seldom need to use a custom manifest; The one generated by Delphi should be good enough for most uses. Try examining the manifest setting in your project again. Share this post Link to post
Dave Craggs 7 Posted October 4, 2023 Hmm - do I need to extract the XML from the res file so Finalbuilder can use it? Need to sort this out next week - am away for the rest of the week. Thanks for the help so far. Share this post Link to post
Vincent Parrett 764 Posted October 4, 2023 The reason for the Ctrl A issues is because the manifest file controls what version of the common controls your application uses - without it you get the very old versions. 8 hours ago, PeterBelow said: Looks like the Finalbuilder version uses a different manifest or an ancient style falling back to an old version of the common dialogs DLL. FinalBuilder uses the manifest file you specifiy in the Delphi Action. 3 hours ago, Dave Craggs said: Hmm - do I need to extract the XML from the res file so Finalbuilder can use it? No, use the example in the blog post that @Uwe Raabe linked to - it's actually the manifest we use for FinalBuilder. The blog post also details why you should not use the one generated by the IDE. In fact FinalBuilder cannot use the delphi IDE generated manifest file for two reasons The ide never saves the file anywhere but in the projectname.res file (annoyingly - since this is source code). It uses a template file that uses variables only available to the delphi IDE. Share this post Link to post
Dave Craggs 7 Posted October 5, 2023 Thanks, I am using this as a start point Share this post Link to post
Vincent Parrett 764 Posted October 5, 2023 You might also want to add high dpi support via the dpiAware or dpiAwareness elements Share this post Link to post
Dave Craggs 7 Posted October 5, 2023 yes and Windows 11 probably. This is just the first quick fix until I am back next week. Thanks Share this post Link to post
Vincent Parrett 764 Posted October 5, 2023 5 minutes ago, Dave Craggs said: yes and Windows 11 probably. There is no specific guid for Windows 11 accorrding to MS "The following GUIDs correspond with the indicated operating systems: {8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a} -> Windows 10, Windows 11, Windows Server 2016, Windows Server 2019 and Windows Server 2022" Share this post Link to post
Dave Craggs 7 Posted October 9, 2023 On 10/5/2023 at 7:37 AM, Vincent Parrett said: You might also want to add high dpi support via the dpiAware or dpiAwareness elements It does say this in the blog. Am using Delphi 11.3 High DPI support. I'm not going go into to detail on this, it's a complex issue with major differences between windows versions, and limited High DPI support in Delphi. I will say, think very carefully before you enable this, High DPI support in Delphi depends very much on the version of delphi, and third party control support. Don't just enable High DPI support without serious testing. See the msdn doco link at the bottom of this post. Share this post Link to post
Dave Craggs 7 Posted October 9, 2023 This is what I am using now <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <!--The ID below indicates application support for Windows Vista --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!--The ID below indicates application support for Windows 7 --> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!--The ID below indicates application support for Windows 8 --> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <!--The ID below indicates application support for Windows 8.1 --> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!--The ID below indicates application support for Windows 10 & 11 --> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> </application> </compatibility> <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <dpiAware>True/PM</dpiAware> </asmv3:windowsSettings> </asmv3:application> </assembly> Share this post Link to post
Vincent Parrett 764 Posted October 9, 2023 (edited) You should also add the AssemblyIdentity and Description elements, but otherwise it should be ok. Edit : recommend you take a look at https://learn.microsoft.com/en-au/windows/win32/sbscs/application-manifests - it lists whether elements are required or not. Edited October 9, 2023 by Vincent Parrett Share this post Link to post
Dave Craggs 7 Posted October 10, 2023 I set the version of the application when I build using FinalBuilder. Would I need to edit the manifest during this process with the updated version? If so which is the best way to do this? There is this Share this post Link to post
Vincent Parrett 764 Posted October 10, 2023 I generally just set the major version on the manifest , e.g 8.0.0.0 and don't bother with updating it for every build. I also wouldn't use the Mage tool if you are not using .net - it adds stuff to the manifest you don't need/want. Share this post Link to post