private void button2_Click(object sender, EventArgs e) { XuatHang hh = new XuatHang() { 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(); }
private void btnXuatHang_Click(object sender, EventArgs e) { XuatHang frm = new XuatHang(); frm.Show(); }