F
F
foxlye2019-01-24 21:01:09
C++ / C#
foxlye, 2019-01-24 21:01:09

Switching from one form to another doesn't work?

Greetings. Visual Studio cannot find Windows Form 2.
Tried everything, doesn't work.
I have 2 forms Form1 Form2
5c49fd64375ff442224454.png
I decided to put a transition button from the first form to the second, it does not work.
5c49fced126c0262851468.png

private void button1_Click(object sender, EventArgs e)
        {
            Form2 newForm = new Form2();
            newForm.Show();
        }

I decided to launch the application immediately from the second form, it also does not work.
5c49fcc9b668d987795876.png
static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form2());
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
foxlye, 2019-01-25
@foxlye

The point was that everywhere the former names of the forms in the code had to be replaced with new ones.
Thanks to all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question