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...
 
Hi Andy

Thank you .The code snippet you posted did work

Thanks again
Venkatesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top