How to leave new form without depending on the other? [closed]

-3

Here is the code that opens my Form4:

Form4 form4 = new Form4();
form4.Show();
// Aqui um código gigantesco que demora aproximadamente 1 minuto para ser executado.
form4.Close();

The problem is that while Form4 is open, it is gray and static, not move or close. I understand that it gets somewhat dependent on the previous form code, how to solve this?

    
asked by anonymous 12.10.2016 / 19:46

1 answer

1

Hello, take a look at: Long processing ...

There is an answer posted by me and I believe it is a solution for you. Basically you need to start this second form on a different Thread than the one that performs the main processing, so the forms become independent and when a long process is executed the other form will not freeze.

Hugs!

    
14.10.2016 / 08:54