I create a new application with a form that needs to be displayed without scaling but as designed with a fixed dimension in pixels (Position
is poScreenCenter
for example). When setting Scaled
to false
, the form is instead displayed with some default width and height, ignoring the designed dimensions. Setting Scaled
to true
works, it is displayed as designed, but scaling is not wanted.
I have tried to set DPI awareness to None or Unaware, but this has no effect.
I got similar if not the same issues while porting huge CAD/CAM project from BDS2006 C++ -> RAD11 C++ as a test of functionality before purchasing new RAD11:
ManualDock
is corruptingWidth,Height
causing scale is applied twice on docked windows messing up custom layoutsI was planning to change the sizes of problematic VCL components (really just few form sizes and all glyphs) with code at apps init (or maybe create some utility that adjust
*.dfm
files like I did before for app auto translations and other stuff before so I have parsers ready to go so that it would not be a big deal) and planning to obtainscaling
needed for this either by winapi GetScaleFactorForDevice or by the bugged behavior ofManualDock
in RAD11However before that I needed to start my app with admin priviledges from within RAD11 IDE as I deal with device drivers and stuff that needs admin priviledges...
I found and follow this tutorial:
Which Immediately solved all my scaling issues too so no need to handle those for me anymore... Hope it helps you too (maybe even the scaling off option will work again as should have not tested it yet).
Now the App is scaled but correctly (it behaves as not scaled app just bigger)...
So in a nutshell (if the link got broken in time) you need to Add to project a XML file with
*.manifest
extention like this one:note that
Here_Your_Project_filename_without_extention
in 3th line just replace it with the projects name. After that you open your:set
Manifest file
tocustom
and at the bottom browns and select the created manifest file ...That is it just recompile your App and run ... Please let me know if it helped or not.
I tested this on Win10 and RAD11 C++ (trial version win32 target)
This let me thinking that scaling related bugs might be caused by something in auto-generated manifest (have no knowledge and experience with those so I am just wild guessing) file which is bypassed by this approach...
I think you also do not need to use the admin rights part of the manifest so you might want to change that once this is already working for you.