This is not about IDs. This is just incredibly poor design. Do you have source code for all applications? If so you really need to re-work them into one application to be run in one process.
If not, it's not good. You can run "foreign" or "child" applications in your project using
System.Diagnostics.Process.Start
. The call will return the
Process
instance of the child process. After a while (this is already a problem, you may need some delay) you can get the HWND of the main window of the child process via
Process.MainWindowHandle
.
After that, use P/Invoke of Windows API functions to operate with HWND:
SetForegroundWindow
,
SetActiceWindow
,
SetWindowsPlacement
,
SetWindowsPos
. See
http://msdn.microsoft.com/en-us/library/ms632595(v=vs.85).aspx[
^].
—SA