I have started a little app for fun and it needs to make "form1" (See code) keep opening a new window forever. It does this, however it only does the loop after the previous window is closed. So basically it needs to keep opening up additional windows forever at the same time without the user needing to close the window that is already open. Picture of current code
Code of the whole file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PeppaPig
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
loop:
Application.Run(new Form1());
goto loop;
}
}
}
Thanks! Any help is appreciated!