private void BtnGioiThieu_Click(object sender, EventArgs e) { if (KiemTraTenTabConTrol("&Giới Thiệu") == false) { SuperTabItem Tab = superTabControl1.CreateTab("&Giới Thiệu"); GioiThieu frm = new GioiThieu(); frm.Dock = DockStyle.Fill; Tab.AttachedControl.Controls.Add(frm); frm.Show(); superTabControl1.SelectedTabIndex = superTabControl1.Tabs.Count - 1; } }
private void button9_Click(object sender, EventArgs e) { GioiThieu hh = new GioiThieu() { Dock = DockStyle.Fill, TopLevel = false, TopMost = true }; hh.FormBorderStyle = FormBorderStyle.None; this.panelControl.Controls.Add(hh); foreach (Control ctrl in panelControl.Controls) { if (ctrl != hh) { ctrl.Dispose(); } } hh.Show(); }