Every time I click the No button (here button2_click), the program opens itself again, and I cannot figure out why.
private void button2_Click(object sender, EventArgs e)
{
Process game = new Process();
game.StartInfo.FileName = "ShovelShovel.exe";
game.Start();
}
I figured it would launch the game and close, but if I click the button, it just launches my program again. If I click No on that form, then I get a huge list of unhandled exceptions.
Whether I do this.Close(); or Application.Exit(); the program still opens itself.
Can anyone tell me why it would open again? I haven’t altered Program.cs in anyway.
Thank you very much.
Try this: (assuming that the program you are working from is “ShovelShovel Settings.exe” and is the launcher for “ShovelShovel.exe”)
Or even just
If this is still starting the same application, you either have the wrong path, or the exe’s are the same.
To double check, why dont you go into the directory and execute “ShovelShovel.exe” manually from WindowsExplorer.