Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: Delphi10.1 using on 125% Win 10 magnification


This question is answered.


Permlink Replies: 13 - Last Post: Sep 19, 2016 4:59 AM Last Post By: Andrej Mrvar
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 26, 2016 4:13 AM
Hello!

I just installed and tried the latest version of Delphi.
Most of the things works fine with one exception:

When I compile the application with 10.1
several VCL elements become much larger (icons, labels,...).

Before I was using XE6, so the problem maybe occurred even before (with XE7, XE8, or 10).

The problem occurs in Win10 only when using 125% for Size of Text, Applications, and other items.

In this case blurry text appears for several programs (including Delphi itself).
I used this solution to avoid blurry text:
https://www.reddit.com/r/Windows10/comments/3fedsq/a_simple_solution_for_blurry_fonts_in_windows_10/

It works perfect with applications produced with Delphi XE6.

But when using Delphi 10.1:
a) if I check "Disable display scaling on high DPI settings".
icons become larger and fall outside of the border of main Form
b) If I uncheck this, I get blurry text, but icons are fine (right size).

Any hint how to resolve this would be highly appreciated.

Is there an option in Delphi 10.1 to tell that it should behave like
older compilers (e.g. Delphi XE6) regarding the sizes of VCL elements
when using 125% Win 10 magnification?

Andrej

Edited by: Andrej Mrvar on Apr 26, 2016 4:13 AM

Edited by: Andrej Mrvar on Apr 26, 2016 4:15 AM
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 26, 2016 10:27 AM   in response to: Andrej Mrvar in response to: Andrej Mrvar
In Delphi 10.1 in Project / Options / Application

I found a new checkbox called:

Enable High DPI

but checking or unchecking it does not make any difference as I can see.

I would just like that the sizes of VCL controls
would be the same as when generated with XE6
(this works for 100% and for 125% magnifications).

Andrej
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: Delphi10.1 using on 125% Win 10 magnification
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 26, 2016 2:44 PM   in response to: Andrej Mrvar in response to: Andrej Mrvar
El 26/04/2016 a las 19:27, Andrej Mrvar escribió:
In Delphi 10.1 in Project / Options / Application

I found a new checkbox called:

Enable High DPI

but checking or unchecking it does not make any difference as I can see.

I would just like that the sizes of VCL controls
would be the same as when generated with XE6
(this works for 100% and for 125% magnifications).

Andrej

What happens if you set the Forms's Scaled property to false?

Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 27, 2016 4:59 AM   in response to: Antonio Estevez in response to: Antonio Estevez
What happens if you set the Forms's Scaled property to false?

Indeed that helps. If I uncheck Scaled for Forms property it works fine ;)

It seems that this property works differently in 10.1 comparing to XE6.

Actually for me, behavior of Scale Form property is now like I would expect.

Thanks a lot!

Best.
Andrej
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 1, 2016 1:37 AM   in response to: Andrej Mrvar in response to: Andrej Mrvar
Since my computer where I compile Delphi applications works on 125% magnification
setting Forms's Scaled property to false
causes that on computer without magnification all forms and fonts are too large.
Finally, when compiling with Delphi 10.1, I used the following command:

Form1.Scaleby(80,100);

and now compiled application behaves the same as it worked
when it was compiled with Delphi XE6.

Maybe it would be helpful for somebody else as well ;)

A.
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2016 11:07 PM   in response to: Andrej Mrvar in response to: Andrej Mrvar
Anybody knows why this happened:
behavior of scaling forms and other components in Delphi 101
is different comparing to those in Delphi XE6
when user has different display settings e.g. 125% magnification
and/or 100% magnification?
Thanks.
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 5, 2016 3:35 AM   in response to: Andrej Mrvar in response to: Andrej Mrvar
Andrej Mrvar wrote:

Anybody knows why this happened:
behavior of scaling forms and other components in Delphi 101
is different comparing to those in Delphi XE6
when user has different display settings e.g. 125% magnification
and/or 100% magnification?
Thanks.

This is probably related to DPI awareness. In the project options, look
at the Application page. Under the options you can set in the manifest
for the application there is one to enable DPI awareness. See how your
application behaves when you enable or disable that.

--
Peter Below
TeamB
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 6, 2016 6:42 AM   in response to: Peter Below in response to: Peter Below

This is probably related to DPI awareness. In the project options, look
at the Application page. Under the options you can set in the manifest
for the application there is one to enable DPI awareness. See how your
application behaves when you enable or disable that.

Thanks Peter. I tried that, but has no effect...

I solved the problem when compiling with Delphi 10.1 by rescaling all forms using
Form1.Scaleby(80,100);
or
ScaleControls(80,100);

But I hate that I have to check everything and change the code when migrating to newer compiler
for the things which are supposed to work the same ;(
It is so stressful every time when I migrate to new compiler, since I do not know what
everything will not work as expected..

Best.
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 12, 2016 3:03 AM   in response to: Andrej Mrvar in response to: Andrej Mrvar
Hello!

Anybody knows when this change happen (in which Delphi version)?

In Delphi XE6 and previous versions (e.g. XE, XE2)
developing Delphi applications on 125% Win 10 magnification works in the expected way.

In Delphi 10.1 which I have bought recently it works differently (it resizes all forms and controls again when program is executed).

Enabling/disabling DPI awareness does not have any effect.

Therefore question: Does this happen in XE7, XE8, 10, or 10.1?

I plan to migrate to the latest version that works the same as XE6.

Thanks in advance.
Andrej


Andrej Mrvar wrote:

This is probably related to DPI awareness. In the project options, look
at the Application page. Under the options you can set in the manifest
for the application there is one to enable DPI awareness. See how your
application behaves when you enable or disable that.

Thanks Peter. I tried that, but has no effect...

I solved the problem when compiling with Delphi 10.1 by rescaling all forms using
Form1.Scaleby(80,100);
or
ScaleControls(80,100);

But I hate that I have to check everything and change the code when migrating to newer compiler
for the things which are supposed to work the same ;(
It is so stressful every time when I migrate to new compiler, since I do not know what
everything will not work as expected..

Best.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 12, 2016 11:56 AM   in response to: Andrej Mrvar in response to: Andrej Mrvar
Andrej wrote:

Anybody knows when this change happen (in which Delphi version)?

Manifest support for High-DPI was added in 10.0 Seattle, and VCL/FMX support
for High-DPI was added in 10.1 Berlin.

--
Remy Lebeau (TeamB)
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 12, 2016 1:21 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thanks for this Remy. Exactly information I needed.
Then I should switch to XE8, because it works in the old way according to High-DPI
and which allows 64 bit integers (int64) as for loops variables.

Best.
Andrej

Remy Lebeau (TeamB) wrote:
Andrej wrote:

Anybody knows when this change happen (in which Delphi version)?

Manifest support for High-DPI was added in 10.0 Seattle, and VCL/FMX support
for High-DPI was added in 10.1 Berlin.

--
Remy Lebeau (TeamB)
Quentin Correll


Posts: 2,412
Registered: 12/1/99
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 13, 2016 11:31 AM   in response to: Andrej Mrvar in response to: Andrej Mrvar
Andrej,

| Then I should switch to XE8, because it works in the old way
| according to High-DPI

I have "stuck-with" RAD Studio XE8. MANY things in later versions have
been a major PITA in my simple environment!!!

--

Q -- XanaNews 1.19.1.372 - 2016-07-13 11:29:07
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 13, 2016 12:40 PM   in response to: Quentin Correll in response to: Quentin Correll
In my opinion when some new features appear in new Delphi version,
user should have a control to check or uncheck usage of this feature:
user can use the new feature or work in the old way.
In this way maintaining programs would be much easier.
A.
Andrej Mrvar

Posts: 99
Registered: 10/20/10
Re: Delphi10.1 using on 125% Win 10 magnification  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2016 4:59 AM   in response to: Andrej Mrvar in response to: Andrej Mrvar
Anyone knows: Is this fixed in Update 1?
Thanks.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02