C++ Builder 11 - TCheckBox Scales When Form Scaled is False - Work around?

235 views Asked by At

I submitted a bug (RSP-30892) to Embarcadero over 1.5 years ago (since Rad Studio 10.4) regarding the following issue:

TCheckBox is scaling when it shouldn't when Windows 10 is set to 150% scaling. The form property is set to Scaled=false, the checkbox still scales 150%. Other controls conform to the form property.

While I have patiently waited for a fix on their end, it has yet to occur. I have tried to override the PixelsPerInch property of the control, but it is ignored.

The big question: Has anyone had any success with a work around, or, a way to override this behavior?

In case it is needed, here is how to reproduce:

  1. Create VCL C++ Forms project.
  2. Set form's "Scaled" property to false.
  3. Add a TCheckBox to the form.
  4. Apply a style to the application in the project options (like Windows 10 Dark).
  5. Under project options->Packages, turn off dynamic RTL in linker. Turn off runtime packages.
  6. Under project options->Application, Manifest, check Enable Runtime Themes and set DPI awareness to Per Monitor v2.
  7. Run on a Windows with scaling set to 150%.
1

There are 1 answers

1
VLL On

There is another bug report according to which this works as designed: https://quality.embarcadero.com/browse/RSP-24216

Scaled only affects the font size, not the boxes. To fully prevent scaling you must set DPI awareness to "None" in Options -> Application -> Manifest.

You have set the DPI awareness to "Per Monitor v2", which will not work.

When I set DPI awareness to "None", the entire form is scaled. So it seems there is intentionally no way to leave the form small.