So I currently have a multi monitor app on the electron engine which opens a different window with separate content on each monitor. It uses 2 separate processes with the same name to display these windows, "home".

The app can then be used to launch different windows. One of these is called "game". This game opens a control style window on the main monitor, and then the actual game on the second monitor. Both of these are different processes both called "game".

We currently have a small c# console app that can be called and passed a string to try and bring these apps to the front which looks as below:

The problem is that this only ever brings 1 window to the front, not both.
I have researched this and found that it is due to the rules surrounding SetForegroundWindow, and unless i'm mistaken, when we set the first foreground window we are then not allowed to set any others as the console app/process that called the console app is no longer the foreground process.

Is there any way to accomplish bringing 2 separate windows to the front using a c# console app?

I wouldnt want them both in focus. SetForegroundWindow is the only way that I could find to bring a window back to the front of whatever monitor it was open on, and because they are fullscreen apps they need to hide the taskbar (which SetForegroundWindow does). The point of doing it to both was it would set the first as foreground and therefore it would fullscreen and gain focus. The second would then have SetForegroundWindow ran against it and would then take focus away and be fullscreen in it's monitor. I just need both to be brought to the front and be full screen.
– Jack MoranMar 30 '16 at 13:34