Handling hi res

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.
User avatar
Lembasts
Posts: 319
Joined: Thu Mar 15, 2012 9:47 am

Handling hi res

Post by Lembasts »

Greetings,
I have a PS studio app which looks fine on most monitors. However someone just got a 4k monitor and everything looks awful.
How difficult is it to make sure every control is sized appropriately for hi res monitors?

Thanks
David

jvierra
Posts: 14667
Joined: Tue May 22, 2007 9:57 am
Answers: 5
Has voted: 1 time
Been upvoted: 5 times
Contact:

Re: Handling hi res

Post by jvierra »

It depends on the form and if the form was designed with a consistency and layout that lends it self to translation.
You need to look at the Sapien blogs that discuss how to work with this. Look in the InfoCenter for articles on working with hi-rez monitors.

User avatar
Lembasts
Posts: 319
Joined: Thu Mar 15, 2012 9:47 am

Re: Handling hi res

Post by Lembasts »

Thanks. It appears that I have to recalculate the size of every control in the load event?

User avatar
Alexander Riedel
Posts: 7556
Joined: Tue May 29, 2007 4:43 pm
Answers: 1
Been upvoted: 4 times

Re: Handling hi res

Post by Alexander Riedel »

Not necessarily. That really depends on your original layout and the scaling factor used on the 4K monitor. Screenshots from both would help greatly to provide an opinion.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
Lembasts
Posts: 319
Joined: Thu Mar 15, 2012 9:47 am

Re: Handling hi res

Post by Lembasts »

Thanks - but being department of defence we cant show anything. Im just trying to get my head around the basic concepts, sizing and scale, to understand exactly what it is that needs doing...

User avatar
Lembasts
Posts: 319
Joined: Thu Mar 15, 2012 9:47 am

Re: Handling hi res

Post by Lembasts »

Mostly it seems to be the text not scaling. e.g. the text that used to display fine on a button no longer fits. Its like the button shrunk but the text didnt. There also are a few issues with drop down list boxes where they dont seem to fit where they used to.

User avatar
Lembasts
Posts: 319
Joined: Thu Mar 15, 2012 9:47 am

Re: Handling hi res

Post by Lembasts »

I can post a snippet. Here you can see that the buttons have sized ok relative to the group box but the button text and groupbox text is way to large.
Snap1.jpg
Snap1.jpg (22.01 KiB) Viewed 919 times
As the text within the button is not a control in itself, does that mean that I have to adjust all other controls like the form and groupbox and buttons to be larger to fit the text?

User avatar
Alexander Riedel
Posts: 7556
Joined: Tue May 29, 2007 4:43 pm
Answers: 1
Been upvoted: 4 times

Re: Handling hi res

Post by Alexander Riedel »

Can you show that snippet in its "normal" form, for comparison?
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
Lembasts
Posts: 319
Joined: Thu Mar 15, 2012 9:47 am

Re: Handling hi res

Post by Lembasts »

Sure.
Snap2.jpg
Snap2.jpg (40.34 KiB) Viewed 915 times

User avatar
Lembasts
Posts: 319
Joined: Thu Mar 15, 2012 9:47 am

Re: Handling hi res

Post by Lembasts »

Looking at https://info.sapien.com/index.php/guis/ ... i-displays
it appears I just have to run set-dpiawareness at form load and then set autoscale to font.
Then do a bit of docking and some manual font setting and all will be well?

Locked