/// <summary> /// 将一个winform窗体嵌入control中 /// </summary> /// <param name="f">窗体</param> /// <param name="c">control</param> private void InsertForm(Form f, Control c) { if (c != null) { f.TopLevel = false; f.Dock = DockStyle.Fill; f.FormBorderStyle = FormBorderStyle.None; f.MaximizeBox = false; f.MinimizeBox = false; f.ControlBox = false; c.Controls.Add(f); f.Show(); } }
时间: 2024-11-03 02:07:26