I'm using a function to create buttons, the process looks like this:
Powershell
Process{$Button=New-ObjectSystem.Windows.Forms.Button-Property@{Location=New-ObjectSystem.Drawing.Point($X_Position,($Y_Position+$Order*$Y_Height))Size=New-ObjectSystem.Drawing.Size($X_Size,$Y_Size)Name=$NameText=$TextDialogResult=[System.Windows.Forms.DialogResult]::$DialogResult}$Form.AcceptButton=$Button$Form.Controls.Add($Button)}}
I'm trying to use this function to create a button which opens another form window. I've got a proof of concept using this:
Powershell
#Calls the required modules for the scriptAdd-Type-AssemblySystem.Windows.FormsAdd-Type-AssemblySystem.Drawing#Form Details$Form = New-Object System.Windows.Forms.Form -Property @{ Text = 'form' ...