MdiParent

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I have set a form as an mdicontainer which holds 5 other child forms .Every time I click the toolbar button to open a child form ,a new child form is instantiated.I would like to close the other child forms.Thank you all for your responses.Can anyone guide me in this area..
code snippet is as follows

if(e.Button.Text.Equals("Begin BuyBack ")

TMS_UniversalBuyingTool.frmBuyBack buyback=new frmBuyBack()
buyback.MdiParent=this
buyback.Show()
}
 
foreach(Form form in this.MdiChildren)
{
form.Close();
}



Venkatesh said:
Hi All:

I have set a form as an mdicontainer which holds 5 other child forms
..Every time I click the toolbar button to open a child form ,a new child
form is instantiated.I would like to close the other child forms.Thank you
all for your responses.Can anyone guide me in this area...
 
Back
Top