I got two executables (Program1.exe and Program2.exe) which each open the other one when closed:
Here some code from Program1.exe:
private void Main_FormClosing(object sender, FormClosingEventArgs e)
{
Application.Exit();
Process.Start(Environment.CurrentDirectory + @"\Program2.exe");
}
However, when I do this, it opens two windows instead of one. Is there any way to let it open one window only?