Hi
I have one powershell form the launches another from a button. When the 2nd form is active, the 1st one becomes unresponsive.
Searching on the net reveals info relating to the showdialogfunction:
Form.ShowDialog()|Out-Null
I have attempted to open the 2nd form by using a RunSpace, but this doesnt work:
$rs = [Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace()
$rs.Open()
$rs.SessionStateProxy.SetVariable("RemoteControl", $RemoteControl)
$p = $rs.CreatePipeline( { [void] $RemoteControl.ShowDialog() } )
$p.Input.Close()
$p.InvokeAsync()(The above code is in the 2nd form)
I have a feeling Im on the right track, but I just cant get it to work....