New and old psf files, and DPI scaling

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

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 5 years and 4 days 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.
Locked
User avatar
JeffreyN
Posts: 4
Last visit: Tue Jul 12, 2022 12:05 am

New and old psf files, and DPI scaling

Post by JeffreyN »

I have a project created quite a while ago, in Powershell Studio 2017 if not 2016. Basically before high DPI scaling came in. Now running 2019, and all of the current updates.

Recently I have added a 4K monitor to my computer, so getting all of the challenges of scaling, which is to be expected. I have tried to follow the design principles for high DPI and scaling in the original project, but still not getting it right in some areas.

The design principles are noted in https://info.sapien.com/index.php/guis/ ... i-displays and mentions new functions / snippets were added around then.

This brings me on to the question.. Is there a difference in scaling for recently created psf files and older psf files? The project contains several psf files, created at different time periods. The newer ones scale perfectly without changes, the older ones are all over the place, despite both using the same kinds of design principles. For example two forms, each containing a text box, a button and a label. In the older file, I end up with overlapping elements and tiny fonts, where a similar form which was recently added will scale well.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: New and old psf files, and DPI scaling

Post by davidc »

Yes, you need PowerShell Studio v4.2.124 or higher to support DPI scaling. So, if the psf was not updated in a newer version, it will most likely not scale correctly.

To update the psf files you should just have to open them and hit Save. I recommend doing this in a 96 DPI environment, so that the correct scale is applied. The reason is you want to do this is to match the same DPI when the form was created.
David
SAPIEN Technologies, Inc.
User avatar
JeffreyN
Posts: 4
Last visit: Tue Jul 12, 2022 12:05 am

Re: New and old psf files, and DPI scaling

Post by JeffreyN »

Thanks David. I have updated the files from a 96dpi environment on newer powershell studio, but it's still doing odd scaling. That's OK, I am taking this as an excuse for a redevelopment of the project (Starting with good practices).
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: New and old psf files, and DPI scaling

Post by davidc »

When it comes to DPI scaling: Anchoring, docking and table layouts make the difference.
David
SAPIEN Technologies, Inc.
This topic is 5 years and 4 days 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.
Locked