I've got a Windows 8 tablet with a Full HD resolution of 1920x1080 pixel set.
But when I use Delphi's Screen
object to get the Screen.Width
and Screen.Height
it will return a resolution of 1280x720 running on that Windows 8 tablet.
Where is the problem rooted? On the Windows (tablet) side or on the Delphi side? I use Delphi 7 up to XE2 with equal results. This seems to be rather a tablet problem than a general Windows 8 problem since I do not have such a behavior on my Windows 8.1 desktop machine.
Conclusion
I just wanted to highlight the cause of my problem since it is kind of hidden in the comments.
By default Windows 8 on my tablet is using 150% DPI. 1080px are 150% of 720px. So 720px are usable by applications. Decreasing the DPI percentage to 100% results in the expected 1080px resolution.
It could be DPI-related problem. Aero can handle high-DPI situations in two ways:
May be in the second situation Aero is lying not only about DPI, but also about screen resolution.
If the second scenario is your case, then DO NOT turn off scaling. Just make your application DPI-aware: http://www.rw-designer.com/DPI-aware - general info http://www.micro-isv.asia/2010/09/high-dpi-support-in-windows-vista-and-7/ - delphi
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With