I have two forms, Form1 and Form2.
Form1 is already open in the background and form2 is open above in showdialog()
.
I would like to call a method in Form1 from Form2 before closing it.
Here is my code:
// In the form1
form1 frm = (form1)Form.ActiveForm;
frm.AfterConnect();
Close();