is it possible in clarion ??
Anyone with some experience ??
(I do not want to code a UWP app)
There is a DPI aware checkbox in the manifest section. Don’t know if that helps
Standard templates generate incorrect dpi entries in the manifest, I have posted the fix, it also allows to choose System aware or Per Monitor mode:
Mike’s correction seems to be generating the manifest correctly, however, by running GetPosition I still get the same values as before.
(Using the win api, I always get the corrects values for the monitor).
Maybe I’m not understanding something, but I shouldn’t have a correct answer with GetPosition to be able to correctly position the controls?
I have a problem with dpi awarenes in Clarion, apps generated with clarion are
ok (thank to mike’s fix) but Clarion is not.
Is there some fix for clarion ?
Thanks,
Petar
This is over a year later, but maybe you needed to set PROP:Pixels before calling GetPosition().
But the result also depends on whether you’re in an MDI window, plus other stuff can affect it.
Sometimes ScreenToClient() and/or ClientToScreen() can help to interpolate the actual position, but now you’re into the API again anyway.
Hi Pepe - Would you mind adding some more details? I’m not sure I understand what you’re asking.
You mean the C7-C11 IDE?
Yes, I mean Clarion 11 IDE
Have you tried creating your own manifest file or used the ACT as it can also make changes to apps. Its like the XP Compatibility mode seen in the exe, properties, compatibility tab, but on steroids.
Introduction to the Application Compatibility Toolkit (ACT) Version 5.6 | Microsoft Learn
I tought that somebody has manifest that works to share…
I hace an app dpi aware and it’s working ok, i can help but at the moment i am vacationing and only with occasional internet.
Petar,
Edit clarion.exe.manifest in your Clarion BIN folder and add these lines towards the end. After the </dependency>
line.
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware> <!-- fallback for Windows 7 and 8 -->
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness> <!-- adding v1 as fallback would result in v2 not being applied to dialogs on capable systems -->
</asmv3:windowsSettings>
</asmv3:application>
Does that do what you want?
@CarlBarnes - this should probably be it’s own topic. Making Clarion IDE DPI aware
This might be of interest. Top link explains the manifest.
Setting the default DPI awareness for a process (Windows) - Win32 apps | Microsoft Learn
SetProcessDPIAware function (winuser.h) - Win32 apps | Microsoft Learn
SetProcessDpiAwareness function (shellscalingapi.h) - Win32 apps | Microsoft Learn
There’s also GDI Scaling.
Non-vector graphics (such as bitmaps, icons, or toolbars) cannot be scaled by this element. In addition, graphics and text appearing within bitmaps dynamically constructed by applications also cannot be scaled by this element. For more information, see Improving the high-DPI experience in GDI based Desktop Apps.
Application manifests - Win32 apps | Microsoft Learn
Does anyone know if parts of the Clarion IDE use GDI considering they use bitmaps, icons and toolbars?
No idea, but it’s based on SharpDevelop, which I think is open source. That won’t give you the Clarion IDE source, but that’s what it’s based on.
LOL. I know, but there’s a lot of it and I havent looked in any great detail at it so I dont know if parts of it use GDI.
On windows 11 it is not working… scale at 125% blurry menu.