private void glassButton2_Click(object sender, EventArgs e) { frmTestMethod ft = new frmTestMethod(_fmMain); ft.TopLevel = false; ft.Name = "c_testMethod"; this.Parent.Controls.Add(ft); ft.BringToFront(); //ft.WindowState = FormWindowState.Maximized; ft.Left = this.Width / 2 - ft.Width / 2; ft.Top = this.Height / 2 - ft.Height / 2 - 50; ft.Show(); }
private void gbtnTestMethod_Click(object sender, EventArgs e) { //if (m_ElongateSensorCount == 0) //{ // MessageBox.Show("请先连接设备!"); // return; //} frmTestMethod ftm = new frmTestMethod(this); ftm.TopLevel = false; ftm.Parent = this.panelContainer; ftm.BringToFront(); ftm.Size = this.panelContainer.Size; ftm.Show(); }