Delphi program resolution

We have a Delphi 7 program running on Windows 7 Professional SP1, developed about 10 years ago. This has become unusable on the current system because some form elements are not sized correctly, so the text they contain does not fit or the graph overflows the bottom of the window:

Figure 1: Table Rows Are Wrong Size (or Text is Larger Than It Should Be)

enter image description here

Figure 2: There is a graph in the window, but the bottom of the graph is not visible. And there are no scrollbars ...

enter image description here

We have no source code and we have no contact with the people who developed the software. We believe the software was built into Delphi 7 because it uses several xxxx70.bpl libraries.

We tried to change the screen resolution and change the compatibility mode used to run the program with no luck.

Is there anything we can try?

+3


source to share


1 answer


Your program is not DPI aware and you are working with font scaling settings, which means the application is being requested to scale. The application font scales automatically, but the Delphi application does not adapt.

I see some options for you:

  • Start the machine with 100% font scaling.
  • Start the machine with font scaling> 125%. Then DPI virtualization will start, in which the problem should be corrected. Although the application may look fuzzy as it will suffer from anti-aliasing when scaling.
  • Try to find the mapping setting that forces DPI virtualization. I don't know if such a thing exists.
  • Edit the .dfm resources in the executable to set the property Scaled

    to true. This will require a resource editor that Delphi understands. For example, the XN resource editor. I don't know if this will work. If that works, each shape will re-scale to match the font scaling.


Refresh

Forcing DPI virtualization won't help, think. The system will tell your application that the font scaling is 125% and scales from there. But your application won't even handle 125% correctly. So you have little options other than to disable font scaling or perhaps try using a property Scaled

.

+4


source







All Articles