perryhs 0 Posted March 10, 2022 I compiled and used a search program which used a background image (TImage) on a form in the community edition version 10.3. When I ran the program, the window autosized perfectly to the size of the image, which is what I wanted. I upgraded to 10.4 recently and made a small addition to a part of the code which did not affect the image or window size. When I recompiled the code and ran it, it opened a very large window (not maximized) of strange dimensions in which the form displayed in the upper left hand corner. The form filled one third of the window instead of the full size. If I were to guess, the x and y dimensions seemed to be reversed. I thought that maybe my addition to the code affected something, so I tried compiling the original code from 10.3 in 10.4, but that also produced the same incorrect window size. Is there a bug in the 10.4 version? Share this post Link to post
Remy Lebeau 1398 Posted March 11, 2022 (edited) 7 hours ago, perryhs said: Is there a bug in the 10.4 version? Possibly. Embarcadero has been playing around with High-DPI support for a few versions now, which can cause weird side effects. Edited March 11, 2022 by Remy Lebeau Share this post Link to post
Pat Foley 51 Posted March 11, 2022 If you stored the image in the image control. Try this in 10.4 Select Image in Design window. Bring up the Picture editor F11 for object inspector and click on ellipses ... In the Picture editor save image as some thing else plus extension what it was.( .bmp .ping) view the image with other app. Other wise just delete the image control and install fresh one. Share this post Link to post
perryhs 0 Posted March 11, 2022 Thanks for your suggestions. Although I could understand this if the difference in the version numbers was very great, or if the code was very, very old, but I don’t like the fact that there is such a discrepancy compiling code just between 10.3 and 10.4. Anyway, I had to play around with the code base somewhat and found an easy workaround – I changed the ClientWidth and ClientHeight values on the Form1 until the program looked like it did before. I don’t know how the Delphi compiler figures this, but the difference was rather remarkable. The original width was 1920 and the height was 1080. I had to change these to 1500 and 860 respectively. Share this post Link to post
Tom Chamberlain 47 Posted March 11, 2022 Maybe something to do with Marco's blog post from January 3rd, here. Share this post Link to post
Pat Foley 51 Posted March 11, 2022 2 hours ago, Tom Chamberlain said: Maybe something to do with Marco's blog post from January 3rd, here. Actually Marco's post is between D11 to D10.4 PE flags updated to 6 to allow thinner borders and more margin. 21 hours ago, perryhs said: window autosized perfectly to the size Try Autosizing False and Center True. To center image on form set align = alClient. That allows changing images readily. Share this post Link to post
perryhs 0 Posted March 11, 2022 I tried that, but it did not work. In fact, the window was totally misaligned. Share this post Link to post