Jac*_*ost 7 .net c# mdi mdichild winforms
我正在研究一个库存软件,突然发现我需要一些主要形式,我应该通过它打开所有其他形式,所以我创建了一个名为frmMainPanel并使用菜单条将其链接到另一个我成功链接它们但是它们在主窗体之外打开,我使用以下代码链接它们
使用以下方法链接frmSaleInvoice表单:
frmSaleInvoice childForm = new frmSaleInvoice();
cs.show()
Run Code Online (Sandbox Code Playgroud)
现在我意识到我应该让他们成为主要形式的孩子,所以我尝试使用以下代码:
frmSaleInvoice childForm = new frmSaleInvoice();
childForm.MdiParent = this;
childForm.Show();
Run Code Online (Sandbox Code Playgroud)
但它说 **" Form that was specified to be the MdiParent for this form is not an MdiContainer."**
任何人都可以帮助我,我错了,我怎么能把一个名为frmSaleInvoice的表格制作成名为frmMainPanel的其他形式的孩子
您应该IsMdiContainer = true为父表单设置.
| 归档时间: |
|
| 查看次数: |
15404 次 |
| 最近记录: |