I build a Powershell studio form application which uses external tools and have 3 screens.
When I run my application and I start on of those tools the window opens only on the main screen (similar with credential popup).
How can I let it open on the active screen where my application is running where I started the tool with?
Is there option/setting?
Thanks!
Multi Display - Powershell forms opening on the focus display screen
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: Multi Display - Powershell forms opening on the focus display screen
To do this you will have to leverage the desktop API which is not available in the Net Framework. You should also be able to package this as an EXE and it should display in the active session.
Re: Multi Display - Powershell forms opening on the focus display screen
the compiled exe file opens in the active screen but all popup windows I generated from the app opens from the default main screen.
I think you need to overwrite this default main screen setting somehow.
But maybe not possible with Powershell/Sapien Powershell studio?
I think you need to overwrite this default main screen setting somehow.
But maybe not possible with Powershell/Sapien Powershell studio?
Re: Multi Display - Powershell forms opening on the focus display screen
That is because the PowerShell engine and the Sapien host are not designed to support multiple screens.
You should ask in the Sapien product support forum to validate this as I have all my monitors in use and cannot set up a test without a lot of pain right now.
Also here is a discussion that references various behaviors of a program in a multi-monitor setup and how to force apps to the desired monitor.
https://www.displayfusion.com/Discussio ... dc4fc3243f
You should ask in the Sapien product support forum to validate this as I have all my monitors in use and cannot set up a test without a lot of pain right now.
Also here is a discussion that references various behaviors of a program in a multi-monitor setup and how to force apps to the desired monitor.
https://www.displayfusion.com/Discussio ... dc4fc3243f
Re: Multi Display - Powershell forms opening on the focus display screen
why not something like
$form1_Load={
#TODO: Initialize Form Controls here
$this.Location = '-500,100'
}
While it might start on the center/main screen, you can use the location to move it to a second monitor. I'm guessing, you want these applications to open in the same spot everyday, and each app you want it displayed on it's own monitor
$form1_Load={
#TODO: Initialize Form Controls here
$this.Location = '-500,100'
}
While it might start on the center/main screen, you can use the location to move it to a second monitor. I'm guessing, you want these applications to open in the same spot everyday, and each app you want it displayed on it's own monitor