UweRaabe / DFMScaling

Stores DFM files as 96 DPI while allowing to design in High DPI
MIT License
21 stars 5 forks source link

Form with frame #1

Open BertThewessen opened 9 months ago

BertThewessen commented 9 months ago

I have serious scaling problems in Delphi 11/12 especially when using frames. I am searching for solutions. Designing at 96 DPI would solve the problem, but that is not practible on a High DPI screen. Your new option RSP-35301 would solve the problem (yes I voted for that option).

In the meanwhile I tried your DFMScaling tool. It works Ok for seperate frames and forms. But if I put a frame on a form and try to run the program I get error 'Class TFrameX not found'. I tried to look for the error, but I am not familiar with the used techniques.

UweRaabe commented 8 months ago

As long as the IDE itself lacks the capability of correctly handling some scenarios, the value of this project is questionable at least.

BertThewessen commented 8 months ago

Well a frame on a form is a rather common scenario and not just some exotic scenario.

Despite what I said before, an individual frame is not correctly scaled down by the tool. The reason is that the frame is put on a temporary form and this form is scaled down, including the frame. Which results in exactly the same frame scaling problems as in the IDE. I found a solution for the frame scaling problems in the IDE and that solution could easily be built in the tool. But since the tool cann't handle a frame on a form, it's useless to me.

BertThewessen commented 8 months ago

I don't think the IDE is the problem. The tool makes a copy of the form outside the scope of the project. A reference to a frame on that form cannot be resolved. When I close all projects in the IDE and open the form with frame, I get exactly the same error in the IDE: Class TFrameX not found. And making a copy within the scope of the project would likely result in a 'Form already existst' error.

But why making a copy? You could scale down the original form, save it and than scale it up again. But perhaps that is not possible.