0

I have two WPF Applications, for example, one is A_wpf application, the others is B_wpf application. There are one Button on each application. I want to Button in A_wpf application to Start up B_wpf application and show B_wpf with Maximized. I want to Button in B_wpf application to do the same thing as A_wpf Application do.

Could anyone give me any advices please?

Scarface
  • 51
  • 3

1 Answers1

2

You can use Process.Start(path_to_exe):

using System.Diagnostics;

//...

Process.Start(path_to_exe);

Now if you want to avoid opening another instance if the target application is already running, you coud use Mutex for that.

Community
  • 1
  • 1
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
  • Thanks for you answer. But there is another problem: How `A_wpf` switch `B_wpf` like `Alt + Tab` do. `A_wpf` swith `B_wpf`, `B_wpf` must on top of the desktop. – Scarface Apr 11 '16 at 03:39
  • In this case, I would go for inter-process communication between the applications. The only method I know is socket communication via localhost, but I'm not sure it's the best or even the only way. – heltonbiker Apr 11 '16 at 18:44