hi, my problem is, in the main form i want to click a button and two forms show dialog sync, and then in form3, in closed form event i want to close form2 . how should to do this?
Thread
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

NarayanRank #8,477 · 221 reputationPosted Oct 3, 2011, 7:54 PM EDT
Try to create a public delegate and add a property of its type it in the other form which you want to close. Then in the form closing event just invoke the delegate, you are done.
Mahdi Gholami6 reputationPosted Oct 10, 2011, 9:59 PM EDT
public delegate void closedelegate();
private void Form3_FormClosed(object sender, FormClosedEventArgs e){
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "Form2")
{
frm.invoke(new closedelegate(frm.Close));
break;
}
}
}