private void BtnDetails_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var frm = new FrmDetails(); var ISACTIVE = false; foreach (XtraForm Child in MdiChildren) { if (Child.Name == frm.Name) { Child.Activate(); ISACTIVE = true; break; } } if (!ISACTIVE) { frm.MdiParent = this; frm.Show(); } }