I need to to set the Form`s position, size, etc.. when it loads
So far I can only get WindowState working using the $Form1_Shown = {} event, all others fail...
$Form1.Size.Width = $varFrmMSizeWidth
$Form1.Size.Height = $varFrmMSizeHeight
$Form1.Location.X = $varFrmMLocationX
$Form1.Location.Y = $varFrmMLocationY
$Form1.StartPosition = $varFrmMStartPosition
$Form1.WindowState = $varFrmMWindowState
These global variables are populated from an XML file when the form loads
Besides "WindowState" how to get all others working?
Form position size...
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: Form position size...
Ok, found the solution here
viewtopic.php?t=1751
$Form1.Size = New-Object System.Drawing.Size ($varFrmMSizeWidth, $varFrmMSizeHeight)
$Form1.Location = New-Object System.Drawing.Point($varFrmMLocationX, $varFrmMLocationY)
Thank you.
viewtopic.php?t=1751
$Form1.Size = New-Object System.Drawing.Size ($varFrmMSizeWidth, $varFrmMSizeHeight)
$Form1.Location = New-Object System.Drawing.Point($varFrmMLocationX, $varFrmMLocationY)
Thank you.