private void menu_TestSystem_Click(object sender, EventArgs e) { pl_MainForm.Controls.Clear(); FrmTestSystem fts = new FrmTestSystem(); fts.FormBorderStyle = FormBorderStyle.None; fts.Dock = System.Windows.Forms.DockStyle.Fill; fts.TopLevel = false; pl_MainForm.Controls.Add(fts); fts.Show(); }
private void Form1_Load(object sender, EventArgs e) { try { this.pl_MainForm.Controls.Clear(); FrmTestSystem fts = new FrmTestSystem(); fts.FormBorderStyle = FormBorderStyle.None; fts.Dock = System.Windows.Forms.DockStyle.Fill; fts.TopLevel = false; this.pl_MainForm.Controls.Add(fts); fts.Show(); } catch (System.Exception ex) { MessageBox.Show("Can't Open Form Page."); } }