foreach (Control item in this.panel_childForm.Controls) { if (item is Form) { ((Form)item).Close(); } } childForm.TopLevel = false; childForm.Parent = this.panel_childForm; childForm.FormBorderStyle = FormBorderStyle.None; childForm.Dock = DockStyle.Fill; childForm.Show();在winform中是什么意思
时间: 2023-04-10 07:04:56 浏览: 156
这段代码的作用是在 WinForm 窗体中,关闭 panel_childForm 控件中所有的子窗体,并将 childForm 窗体作为子窗体添加到 panel_childForm 控件中,并设置其边框样式为无边框,填充整个 panel_childForm 控件,并显示 childForm 窗体。
阅读全文