DPI-Aware GUI Application

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
r41z0r
Posts: 8
Last visit: Sun Mar 04, 2018 10:36 pm

DPI-Aware GUI Application

Post by r41z0r »

Product, version and build: Powershell Studio 2016 Version 5.2.127
Version of product: 64 bit
Operating system: Windows 10 64 bit
PowerShell Version: 5.0.10586.494

Hello there,

is there an option the make your Application directly DPI-Aware via manifest or do I have to create my own manifest file with DPI-Awareness.

My Application has to have the following features: autoelevation, restriction to Win7/10, single instance, true dpi-aware. All of these settings but dpi-aware are easily possible or am I missing something?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: DPI-Aware GUI Application

Post by davidc »

If you are packaging your psf file into an executable using PowerShell Studio, then the application will automatically be DPI-Aware. The DPI awareness is configured in the packager's default manifest. If you are using a custom manifest, then you will need to modify your custom manifest.

As for elevation, selected the manifest for elevation:
Elevation Manifest.png
Elevation Manifest.png (63 KiB) Viewed 2827 times
To limit the executable to a specific OS, go to the Restrictions tab of the packager settings:
Packager Restrictions.png
Packager Restrictions.png (62.97 KiB) Viewed 2827 times
David
SAPIEN Technologies, Inc.
User avatar
r41z0r
Posts: 8
Last visit: Sun Mar 04, 2018 10:36 pm

Re: DPI-Aware GUI Application

Post by r41z0r »

Well it's not working as aspected in my case...

We have a Domainaccount with standard privileges, there I have turned the DPI to 100%, with my Administrative Account, the default value is 150 DPI and my Application is changing it's size.

The First Picture shows the result on a display with 125 DPI, the other one with a Display with 100 DPI, both have different sizes in the Buttons, I thought the DPI-Awareness would do the same size for all DPI-resolutions.
Attachments
With 125 DPI
With 125 DPI
Bild2.png (54.85 KiB) Viewed 2748 times
With 100 DPI
With 100 DPI
Bild1.png (13 KiB) Viewed 2748 times
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: DPI-Aware GUI Application

Post by Alexander Riedel »

DPI aware means that as the OS scales your UI, the correct fonts and sizes are chosen so that your application appears with the same proportions and text does not look fuzzy.
If you scale 125%, of course everything is shown larger, that is the main purpose of DPI scaling.
If you have a 4K screen and the pixel size would remain the same, most elements in applications would look like a bug on a windshield :D
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 7 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.