Ramu 0 Posted April 16, 2020 (edited) Hi All, I opened the same form in Delphi 2007 and Delphi 10.3. The control values are adjusted to the screen in Delphi ide 2007. But it is not happening in the Delphi 10.3 version. In the DFM file, for one label, I have kept height as 17. When opened in Delphi 2007 ide, the height became 13, which is not happening in 10.3 version. Can you explain to me what is happening back end and what changes I need to make in 10.3 version so that it works in the same way as Delphi 2007 IDE? Thanks in Advance !! Edited April 16, 2020 by Ramu Share this post Link to post
David Heffernan 2345 Posted April 16, 2020 Please provide a minimal project, and describe the display settings on your machine. 1 Share this post Link to post
Ramu 0 Posted April 17, 2020 (edited) Hi David Heffernan Thanks for looking into my issue. I have created a sample Pas/Form file in Delphi 2007 and changed values manually in DFM values. I have changed the height to 17 for labels, 25 for edit boxes and 30 for the button. When I am opening the file in Delphi 2007, all the changed height values are becoming to the original(13-labels, 21 for edit boxes, and 25-button) and pixels per inch value is also becoming 96. But when I am opening the same file in 10.3, all the values are not changed. Attaching the sample Submit Pas/Form file. Display settings : (Windows 10) Display resolution : 1366 X 768 Orientation: Landscape Change the size of text, apps, and other forms 100 % recommended Submit.dfm Submit.pas Edited April 17, 2020 by Ramu Share this post Link to post
Uwe Raabe 2057 Posted April 17, 2020 The handling of PixelsPerInch has changed in recent Delphi versions with High DPI support. This may be the cause of what you see here. 1 Share this post Link to post
Ramu 0 Posted April 17, 2020 (edited) Hi Uwe Raabe It seems like that only. I have increased those controls values still more. I have kept labels' height as 20, button height as 40, and edit boxes' height as 30. When I opened the file in 10.3 Ide, all the changed controls' values are adjusted to 17 for labels', 25 for edit boxes'. But button height remains the same. I think both versions' are adjusting differently. Recently we have upgraded our project from Delphi 2007 version to 10.3. We have a lot of DFM files in our project. Changing them manually will be a huge work for us. If we leave like this, forms are not looking good. Is there any setting to make 10.3 IDE adjust in the same way as 2007 IDE. Edited April 17, 2020 by Ramu Share this post Link to post
Uwe Raabe 2057 Posted April 17, 2020 9 minutes ago, Ramu said: Is there any setting to make 10.3 IDE adjust in the same way as 2007 IDE. Not that I am aware off. A workaround could be to open and save all forms in D2007 on a system with PixelsPerInch = 96. Share this post Link to post
Ramu 0 Posted April 17, 2020 (edited) Hi Uwe Raabe, If I do that, will it work in different pixels per inch machines properly? Few of my team developers work on laptops and few work on monitors(bigger screens). If we open the form in bigger screens, all the form values change accordingly. If anyone makes any changes in that DFM file and check-in that file, all the DFM values will be changed. Now if we open that same file in pixel per inch 96 machine, it will get adjusted to Delphi 10.3 functionality, This will be a problem again. Is there any way to change my machine to a higher pixel per inch and test this? Edited April 17, 2020 by Ramu Share this post Link to post
David Heffernan 2345 Posted April 17, 2020 It's a mess when you have Scaled set to True and you design on different machines with different DPI settings. Always has been. At my office the rule is that forms are always designed at 96 DPI to avoid such issues. Share this post Link to post