- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我当时正在开发一个库存软件,突然发现我需要一些主窗体,我应该通过它打开所有其他窗体,所以我创建了一个名为 frmMainPanel 的窗体,并使用菜单条将它链接到另一个窗体,我成功了在链接它们但它们在主窗体之外打开时,我使用以下代码链接它们
链接 frmSaleInvoice 表单使用:
frmSaleInvoice childForm = new frmSaleInvoice();
cs.show()
现在我意识到我应该让它们成为主窗体的子级,所以我尝试使用以下代码:
frmSaleInvoice childForm = new frmSaleInvoice();
childForm.MdiParent = this;
childForm.Show();
但它说 **"Form that was specified to be the MdiParent for this form is not an MdiContainer."**
谁能帮我解决我弄错的问题,我怎么能把一个名为 frmSaleInvoice 的表格制作成另一个名为 frmMainPanel 的表格的 child
最佳答案
Mdi 父级必须有它的 IsMdiContainer
属性设置为 True
。您可以在设计时在 frmMainPanel
表单中设置此属性。
关于c# - 指定为此表单的 MdiParent 的表单不是 MdiContainer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22619261/
当我想从 ToolStripMenu 打开一个新窗体时,我通常会这样做 private void alumnoToolStripMenuItem_Click(object sender, EventA
我有两个名为 mdfi 和 form1 的表单。我想通过 form1 中的代码使 mdfi 形成一个 MdiContainer。我尝试了以下但程序在我运行时关闭: private void Form1
我们在这里遇到了一个小问题,这让我们很恼火。让我快速解释一下我们在做什么: 我们正在创建一个 Windows 窗体,将其保存为 .DLL 并加载一个 MDIContainer。看起来不错,工作正常,除
全部,我有一个 WinForms MDI 控件,我在其中停靠了几个子窗口。当我第一次这样做时,我设法(以某种方式)摆脱了窗口列表(显示在下面的选项卡式表格上方) 我不是在谈论双窗口菜单(右侧)我知道这
我当时正在开发一个库存软件,突然发现我需要一些主窗体,我应该通过它打开所有其他窗体,所以我创建了一个名为 frmMainPanel 的窗体,并使用菜单条将它链接到另一个窗体,我成功了在链接它们但它们在
我是一名优秀的程序员,十分优秀!