private void MainForm_Load(object sender, EventArgs e) { try { highLightMenuStrip(menuStripType.Normal); this.pl_Main.Controls.Clear(); FrmTestSystem fts = new FrmTestSystem(); fts.FormBorderStyle = FormBorderStyle.None; fts.Dock = System.Windows.Forms.DockStyle.Fill; fts.TopLevel = false; this.pl_Main.Controls.Add(fts); fts.Show(); } catch (System.Exception ex) { MessageBox.Show(string.Format("程序加载出现问题:\r\n", ex.Message)); } }
private void tsMenu_Normal_Click(object sender, EventArgs e) { try { highLightMenuStrip(menuStripType.Normal); pl_Main.Controls.Clear(); FrmTestSystem fts = new FrmTestSystem(); fts.FormBorderStyle = FormBorderStyle.None; fts.Dock = System.Windows.Forms.DockStyle.Fill; fts.TopLevel = false; pl_Main.Controls.Add(fts); fts.Show(); } catch (Exception ex) { FindAndMoveMsgBox(FrmCoordinate.X, FrmCoordinate.Y, true, "常规测试"); MessageBox.Show(string.Format("未能正常加载常规测试模块。\r\n{0}", ex.Message), "常规测试"); } }