I am creating a project in which there is a loop of 3 forms form1->form2->form3->form1->form2->form3.... and loop stays until application is exit. Loop is made through a button. In form3 I have used interop.excel and copied data from a worksheet to an array which is done by selecting an name of excel file from the listbox.
Now the problem is that every time I go from form3 to form1 form3 looses focus and form2 always create a new instance of form3. So even my previous form3 is open it opens new form3.
I have seen and tried solution given on How can I loop through all the open instances of a particular form? and Application.OpenForms.Count = 0 always but it didn't help.
Is there a way that form2 can check if there is any instance of form3 or not and then take a decision to make new instance of form3 or give focus to previous form3 .
Please help me. Thank you in advance.