How to Calculate the Height and Width of Forms in Powerhsell?

BTW: When you post code or sample data or console output please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance

How about trial and error? :wink: I did it just now and I’d recommend for you to start with:

$subformbutton.Location = New-Object System.Drawing.Size(350,600)
$subformbutton.Size=New-Object System.Drawing.Size(100,30)