Resolution issues

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.
Post Reply
disasm
Posts: 8
Joined: Sun Sep 20, 2020 7:37 am

Resolution issues

Post by disasm »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Powershell studio
Operating system: Windows 10
PowerShell version(s): 2020

*** Please add details and screenshots as needed below. ***

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM


I have a scaling issue it seems. When the exe runs on a 4k monitor, it looks great. When it runs on a desktop with a lower resolution, say, 1366x768, all the controls get wacky. Pictureboxes do not appear, controls look huge, and some of the checkboxes disappear (are hidden behind other controls). I have the form settings as not sizeable, anchor is Top, Left. Thanks!

User avatar
Alexander Riedel
Posts: 7490
Joined: Tue May 29, 2007 4:43 pm

Re: Resolution issues

Post by Alexander Riedel »

[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.

disasm
Posts: 8
Joined: Sun Sep 20, 2020 7:37 am

Re: Resolution issues

Post by disasm »

Checking for an update. Thanks!

jvierra
Posts: 14573
Joined: Tue May 22, 2007 9:57 am
Answers: 1
Been upvoted: 1 time
Contact:

Re: Resolution issues

Post by jvierra »

Here is a good place to start addressing your issue:

https://info.sapien.com/index.php/guis/ ... i-displays

For more detailed and complete information I recommend looking at the articles in the info-center and the videos on YouTube:

https://info.sapien.com/index.php/guis
https://info.sapien.com/

disasm
Posts: 8
Joined: Sun Sep 20, 2020 7:37 am

Re: Resolution issues

Post by disasm »

Thanks, I've actually already read the documentation you referenced. The issue isn't so much with the different control types, but more with the form itself. The form is huge on lower resolutions. The form is not resizable, so that presents an issue. How can I lock the size of the form regardless of the resolution? I went ahead and made all my controls have explicit fonts for now. I got the checkboxes to keep showing with the Autosize property set to True. How do I get the form to scale?

Also, to note, I am creating an exe, and I do see this in my config:

<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>

Should this not be the solution to the issue?

jvierra
Posts: 14573
Joined: Tue May 22, 2007 9:57 am
Answers: 1
Been upvoted: 1 time
Contact:

Re: Resolution issues

Post by jvierra »

There are other articles that will help you under5stand how to do that.

disasm
Posts: 8
Joined: Sun Sep 20, 2020 7:37 am

Re: Resolution issues

Post by disasm »

I think I'm having the opposite issue as your articles describe. The GUI was developed on a 4k monitor. When used in a lower resolution, controls get hidden behind each other. I've exhausted all my attempts to fix this. The examples your documentation shows is to dock controls but that takes up an entire side (bottom, top, right, left). Am I missing something?

Post Reply