While the Per-Monitor (V2) DPI Awareness mode can ensure the clarity of text and controls, there are still areas that are not fully supported or optimized:
-
The measurement unit Pixel used in scripts may not calculate properly.
If you use pixel values in the application, note that pixel values will change significantly at high DPI because it will use the real monitor pixel in PerMonitorV2.
Solution: This issue can be resolved by taking advantage of the
GetDpiForWindowfunction and multiplying the original calculation by a "scaling factor" to adapt to different DPIs. For example:Dec lde_scale = 1.0 Int li_width_pixel // Get the scaling rate for the current window. lde_scale = GetDpiForWindow(This)/96 // If the display scaling setting is 150% in a 4K monitor, you will get 1.5. li_width_pixel = 100*lde_scale // If you want to draw a 100px visual yourself, you may now need to draw more pixels on a high DPI display.
-
When working in the current IDE (without DPI support), control sizes may change by 1 pixel after saving or reading them. This is normal behavior caused by internal size conversions.
-
UI or controls rendered by Windows APIs or UI frameworks may not support dynamic DPI.
UI elements or controls (such as TX Text control, InkPicture control) that are rendered by the Windows APIs or third-party UI frameworks may not scale or refresh properly when the DPI changes.
-
The FontSize property returns the original point size and does not change with DPI (font size will be scaled during display).
-
Proportional scaling of non-TrueType fonts is not supported.
If controls use non-TrueType fonts, the fonts and controls may not scale in the same ratio, causing visual discrepancies (e.g., text may not fully display within controls).
Solution: Most fonts are TrueType, but some legacy projects may use non-TrueType fonts. Changing to TrueType font can bypass this issue.


