Product, version and build:Powershell Studio 2017 version: 5.4.134
64 bit version
Operating system: Windows 7
64 bit OS
PowerShell Version: 5
I am new to creating winforms. So i am having issue where I created my GUI on 27" monitor and I am noticing that if it is used on any other smaller sized monitor everything gets moved around or disappears behind other parts of the winform. Also noticed if I resize anything while the form is running nothing shrinks it just disappears. Is there a way to lock the form to a certain size and make everything in the form stay put lol.
locking winform
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.
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.
Re: locking winform
[TOPIC MOVED TO POWERSHELL GUIS FORUM BY MODERATOR]
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: locking winform
If you form is created with incorrect docking or anchor or the form is too large for the screen then it will not resize correctly. Be sure your monitor is set to correct settings for Windows and that you have not altered the 96"dpi or are not using an unsupported graphics card or driver.
Start by building a small form that is correctly anchored and test it when deployed. Also be sure your expectations about how Windows manages forms resizing and display on multiple monitors is accomplished. Using extremely high resolutions can make forms development difficult.
Start by building a small form that is correctly anchored and test it when deployed. Also be sure your expectations about how Windows manages forms resizing and display on multiple monitors is accomplished. Using extremely high resolutions can make forms development difficult.
Re: locking winform
The following article covers the Anchor and Dock properties of GUI controls:
http://info.sapien.com/index.php/guis/g ... nd-methods
You can also use a TableLayoutPanel to prevent overlapping:
https://msdn.microsoft.com/en-us/librar ... .110).aspx
http://info.sapien.com/index.php/guis/g ... nd-methods
You can also use a TableLayoutPanel to prevent overlapping:
https://msdn.microsoft.com/en-us/librar ... .110).aspx
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: locking winform
David's links are a very good place to start but, be warned, the graphics settings can make all of this impossible. Check your graphics first then follow the articles for background on how to make a form resize well. If you want all controls to resize with the form then you have to be sure to use controls that can be resized.
I would start by anchoring all controls to the top left of the form so they stay in relation to each other. Once youmaster that then you can look into adding and anchoring resizable controls.
I would start by anchoring all controls to the top left of the form so they stay in relation to each other. Once youmaster that then you can look into adding and anchoring resizable controls.