
$Form.MinimumSize = New-Object Drawing.Size(706, 531) The result is that it scales horizontally and vertically.Īfter the above is completed for any objects you want to scale, simply anchor any non-scaling items to an edge to prevent the scaling objects from scaling over top.īelow you will find the original post, which I am leaving up since the function Get-RecursiveControls shows how to iterate through all child objects of a form.įirst off, ensure that your form and all child elements you want to scale have a minimum size property configured and set it to the same as the starting size.įor Example (or configure it with the PowerShell Studio “Designer” pane) The result is that it scales horizontallyįor my computer status grid view below, setting $dgClientStatus.Anchor=’Top,Bottom,Left,Right’ means that it will maintain its position in relation to the top, bottom, left and right sides of the tab group. You can use any combination of these to float an object below other objects or to dynamically expand any objects as the form grows/shrinks.įor my dgMonitorInfo below, setting $dgMonitorInfo.Anchor = ‘Top,Left,Right’ means that it will maintain its position in relation to the top, left and right sides of the tab group.

None will float proportionally to the parent object.

The anchor property defines that that the specified edge of the object should maintain its position in relation to its parent object on that edge. Update: June Blender kindly reached out to the experts on this and provided the following method.
