Form does not maintain size when run on different computer

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 2 years and 7 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.
Locked
User avatar
mar10c--
Posts: 59
Last visit: Mon May 22, 2023 6:53 am

Form does not maintain size when run on different computer

Post by mar10c-- »

In PS Studio 2019, I get the desired Form size on my dev computer, but when it is built and the .exe invoked on a different computer, it does not maintain the form size (Width, Height) that I see on the dev machine.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Form does not maintain size when run on different computer

Post by Alexander Riedel »

Please include the screen resolutions and magnification factors of both machines as well as screenshots of both.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
mar10c--
Posts: 59
Last visit: Mon May 22, 2023 6:53 am

Re: Form does not maintain size when run on different computer

Post by mar10c-- »

Just found out it's the resolution on my dev machine is higher (1920 x 1080). Is there a way to make the form to work on lower resolution machines as well?
User avatar
mar10c--
Posts: 59
Last visit: Mon May 22, 2023 6:53 am

Re: Form does not maintain size when run on different computer

Post by mar10c-- »

Solved! I changed the settings to AutoScaleMode=Inherit
This topic is 2 years and 7 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.
Locked