I got Solution .
Every time I clicked ,Parent form generate a new form and previous one is still there and not closed so so many same forms are opened at a time .
I try this solution ,
private void btnCompanysetup_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
Form frm = new frmCompanySetup();
if (Application.OpenForms.OfType<frmCompanySetup>().Count() == 1) {
frm.BringToFront();
}
if (Application.OpenForms.OfType<frmCompanySetup>().Count() == 0)
{
frm.MdiParent = this;
frm.Show();
}
}
Thanks for all those response .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.