private void pictureBox2_Click_1(object sender, EventArgs e) { if (pnMain.Controls["CRRestaurant"] == null) { pnMain.Controls.Clear(); CRRestaurant frmres = new CRRestaurant(2); frmres.TopLevel = false; pnMain.Controls.Add(frmres); frmres.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmres.Dock = DockStyle.Fill; frmres.Show(); } }
private void pictureBox2_Click_1(object sender, EventArgs e) { if (pnMain.Controls["CRRestaurant"] == null) { pnMain.Controls.Clear(); CRRestaurant frmres = new CRRestaurant(2); frmres.TopLevel = false; pnMain.Controls.Add(frmres); frmres.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; frmres.Dock = DockStyle.Fill; frmres.Show(); } }