Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: High DPI VCL form problems with Berlin 10.1 Update 1


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 13 - Last Post: Nov 29, 2016 8:33 AM Last Post By: Martin van der ...
Albert Wiersch

Posts: 37
Registered: 11/27/08
High DPI VCL form problems with Berlin 10.1 Update 1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 24, 2016 9:38 AM
Not sure this is the best forum but here goes...

I'm still fighting problems with my 10.1 Berlin (from XE6) upgrade.

The latest one I just noticed is that my forms are messed up on a high DPI machine. They worked when compiled with XE6 but in 10.1 it seems that some controls are improperly resized or re-positioned, like buttons that are off the dialog box so you can't see them and missing scroll bars that are probably also resized off the dialog. Why is this and what can I do about it? Why did it work in XE6 but not in Berlin?
Albert Wiersch

Posts: 37
Registered: 11/27/08
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 30, 2016 3:06 PM   in response to: Albert Wiersch in response to: Albert Wiersch
Albert Wiersch wrote:
Not sure this is the best forum but here goes...

Even after the Berlin 10.1 Update 1, some of my forms, that worked fine in XE6, are still messed up on high DPI systems... like the forms and controls on the forms are not resizing or adjusting their sizes and positions properly.

Any ideas?
Goran Ekstrom

Posts: 149
Registered: 1/10/04
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2016 12:36 AM   in response to: Albert Wiersch in response to: Albert Wiersch
I have the same issue, cannot say exactly what the problem is but the easy solution is to turn off high-dpi support under Application in the project settings. By doing that the app will hand over scaling to Windows which is not as "pretty" as true scaling but works.
Albert Wiersch

Posts: 37
Registered: 11/27/08
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2016 7:20 AM   in response to: Goran Ekstrom in response to: Goran Ekstrom
Goran Ekstrom wrote:
I have the same issue, cannot say exactly what the problem is but the easy solution is to turn off high-dpi support under Application in the project settings. By doing that the app will hand over scaling to Windows which is not as "pretty" as true scaling but works.

Wow... how did such a serious bug get past them and even into Berlin update 1?

My forms worked in XE6... I really do not want to have to turn off high-DPI support.

I've been really disappointed with Berlin so far... too many bugs and problems. Cannot even use the new C++11 compiler and even have issues with the classic compiler that I didn't have in XE6.
Goran Ekstrom

Posts: 149
Registered: 1/10/04
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2016 9:13 AM   in response to: Albert Wiersch in response to: Albert Wiersch
I don't think the high-dpi setting is there in xe6!? It's not in xe8. The short research i've made about it is that enabling high dpi simply places a statement in the apps manifest telling windows that the app can handle scaling by itself, before this setting was there the apps were fixed to windows' automatic scaling unless you added a custom manifest.
Albert Wiersch

Posts: 37
Registered: 11/27/08
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2016 10:32 AM   in response to: Goran Ekstrom in response to: Goran Ekstrom
Goran Ekstrom wrote:
I don't think the high-dpi setting is there in xe6!? It's not in xe8. The short research i've made about it is that enabling high dpi simply places a statement in the apps manifest telling windows that the app can handle scaling by itself, before this setting was there the apps were fixed to windows' automatic scaling unless you added a custom manifest.

There wasn't a setting for it but you could do it using your own app manifest file... and it worked better than 10.1 does... maybe I should try using my custom manifest instead and see if I can get the old XE6 behavior back that actually works well enough to use in production... yeah... will have to try that and see what happens.
Goran Ekstrom

Posts: 149
Registered: 1/10/04
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2016 1:37 PM   in response to: Albert Wiersch in response to: Albert Wiersch
There wasn't a setting for it but you could do it using your own app manifest file... and it worked better than 10.1 does..
OK, then I can understand your issue. Strange, enabling it through your own manifest or via the project settings should be the same, shouldn't it?! Keep me/us posted since I have the same issue.
Albert Wiersch

Posts: 37
Registered: 11/27/08
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2016 1:39 PM   in response to: Goran Ekstrom in response to: Goran Ekstrom
Goran Ekstrom wrote:
OK, then I can understand your issue. Strange, enabling it through your own manifest or via the project settings should be the same, shouldn't it?! Keep me/us posted since I have the same issue.

I would think it would be the same but you never know. I hope to try this on Monday and will post back.
Goran Ekstrom

Posts: 149
Registered: 1/10/04
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2016 2:00 PM   in response to: Albert Wiersch in response to: Albert Wiersch
I would think it would be the same but you never know. I hope to try this on Monday and will post back.
Do you use third party components on your form? I noticed that the main main form did not scale properly but if I added a garbage main form to the same app it scaled properly.
Albert Wiersch

Posts: 37
Registered: 11/27/08
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 1, 2016 2:42 PM   in response to: Goran Ekstrom in response to: Goran Ekstrom
Goran Ekstrom wrote:
Do you use third party components on your form? I noticed that the main main form did not scale properly but if I added a garbage main form to the same app it scaled properly.

I use some 3rd party components on various forms..... a lot on my main form but that one actually seemed to scale properly.

I changed the anchors on some buttons and it seemed to work better but something was still wrong.

On one form I have size constraints set and it works at normal DPI but on a high-DPI machine I can change (resize) the height of the form so that it is way outside of the constraint.

On one form I made some alignment changes and added a panel and that seemed to address that issue.... however, I shouldn't have to do these things and there are some forms that I don't know how to fix. Again, these things worked in XE6.

I just have to do more experimenting on Monday... but I don't want to spend too much time on it. I'm hoping that update 2 fixes it, although update 1 didn't really seem to fix the other issues I was having with compiling. I'm still basically stuck using the classic compiler and having to link with the dynamic RTL......... I dread upgrading, maybe that is why they don't have a money-back guarantee. OK... enough ranting.
Albert Wiersch

Posts: 37
Registered: 11/27/08
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 3, 2016 7:28 AM   in response to: Albert Wiersch in response to: Albert Wiersch
Albert Wiersch wrote:
Goran Ekstrom wrote:
OK, then I can understand your issue. Strange, enabling it through your own manifest or via the project settings should be the same, shouldn't it?! Keep me/us posted since I have the same issue.

I would think it would be the same but you never know. I hope to try this on Monday and will post back.

I tried using my old custom manifest file but, as expected, it didn't work. Many of my forms are still messed up on my "high DPI" notebook in the same way.
Martin van der ...

Posts: 57
Registered: 7/14/02
Re: DPI problems with 10.1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 29, 2016 8:33 AM   in response to: Goran Ekstrom in response to: Goran Ekstrom
Goran Ekstrom wrote:
I have the same issue, cannot say exactly what the problem is but the easy solution is to turn off high-dpi support under Application in the project settings. By doing that the app will hand over scaling to Windows which is not as "pretty" as true scaling but works.

If only. Unfortunately, it's not possible to turn it off - the IDE just turns it back on again.
Albert Wiersch

Posts: 37
Registered: 11/27/08
Re: High DPI VCL form problems with Berlin 10.1 Update 1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 10, 2016 1:10 PM   in response to: Albert Wiersch in response to: Albert Wiersch
Albert Wiersch wrote:
Not sure this is the best forum but here goes...

I'm still fighting problems with my 10.1 Berlin (from XE6) upgrade.

The latest one I just noticed is that my forms are messed up on a high DPI machine. They worked when compiled with XE6 but in 10.1 it seems that some controls are improperly resized or re-positioned, like buttons that are off the dialog box so you can't see them and missing scroll bars that are probably also resized off the dialog. Why is this and what can I do about it? Why did it work in XE6 but not in Berlin?

Wow... no one else having issues with their forms being messed up on high DPI screens? I'm still having this issue and using Berlin Update 1. UPDATE: Well it does seem others are having issues as well.

If you are supporting high DPI, then I highly recommend you try your VCL application on a high DPI screen and take a close look at all your forms to make sure all the components are in the right place and are the right size. Check to make sure things have not expanded off the form.

This is really depressing. I may have to release the new version of my application without support for high DPI.
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: High DPI VCL form problems with Berlin 10.1 Update 1  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2016 1:55 PM   in response to: Albert Wiersch in response to: Albert Wiersch
Hi

I just installed Berlin upd2 coming from CB2009 and I think I can see what you are talking about,
because I use 125% font on my PC.
In Tools->Options->SDK Manager they themself have a problem in NDK and the Java tab, see
this picture:
http://asger-p.dk/ScalingProblemsOptions.png

In the old days (BCB5) it was the anchors right and bottom that made that kind of trouble, I'm to new
to Berlin to know what it is nowadays.

The objectinspector does not look to good either, it have some huge checkboxes, that result in a
large line height:
http://asger-p.dk/ScalingProblemsObjectInspector.png

One other thing I noticed is that the Visual VCL designer always work in 96 DPI, no matter what the
system DPI are, this might also give some trouble because sizes and positions might be wrong
when projects comes from environments with other DPI settings.

Just my thought.

Good luck
Best regards
Asger
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02