static class SubFormExtensions
{
    internal static bool AttachTo(this Form subForm, Panel panel)
    {
        if (panel == null || subForm == null) return false;
        subForm.FormBorderStyle = FormBorderStyle.None;
        subForm.TopLevel = false;
        subForm.ShowInTaskbar = false;
        subForm.Show();
        subForm.Dock = DockStyle.Fill;
        panel.Controls.Add(subForm);
    }
}

相关文章:

  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-11-24
  • 2021-11-03
  • 2021-11-17
猜你喜欢
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2022-01-13
  • 2021-07-11
  • 2022-01-05
相关资源
相似解决方案