Forum Discussion
sjn001tvh
Jan 22, 2025Copper Contributor
positioning a set of powershell windows
Greetings, I'm completely new to this area. I have a requirement to display 3 separate powershell windows that are created from nodejs on my server, in essentially this format, ------- ----------...
luchete
Jan 24, 2025Iron Contributor
Hello,
I haven’t had the exact same situation, but I can try to offer some guidance. To position the PowerShell windows, you can use PowerShell's Add-Type cmdlet to access Windows Forms or WPF for managing window positions. After launching the PowerShell windows from Node.js, you can use the System.Windows.Forms library to control window sizes and positions. You’d likely need to grab the window handles and adjust their locations with methods like SetWindowPos. If that doesn’t fully solve it, automation tools like AutoHotKey can sometimes help with moving and resizing windows more dynamically.
Hope it helps!