Application run new form1

A classic!

In Windows Forms, when you want to run a new instance of a form, you can use the following code:

Form1 form = new Form1();
form.Show();

This code creates a new instance of the Form1 class and then shows it using the Show() method.

If you want to run the form as the main application window, you can use the following code:

Application.Run(new Form1());

This code starts a new instance of the Form1 class and runs it as the main application window.

Note that Application.Run() is a static method that starts a new instance of the application and runs the specified form as the main window. It's commonly used in the Main method of a Windows Forms application.

Here's an example:

using System;
using System.Windows.Forms;

namespace MyApplication
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

In this example, the Main method creates a new instance of the Form1 class and runs it as the main application window using Application.Run().