Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 MDI 应用程序,并且有一种使用子窗体创建的菜单,因此它保留在父窗口中。我想要的是当我调用 LayoutMDI (或一些变体)时,除了这种形式之外的所有形式都被级联、平铺等,但我似乎无法找到一种方法来做到这一点。
我尝试过覆盖 LayoutMDI,但这是不允许的(它不是虚拟的),而且我似乎无法在任何地方添加 if 语句来排除一个窗口。
有任何想法吗?
谢谢。
我建议您将代码更改为;
form.TopLevel=false; form.Parent=this; form.Show();
希望这可以解决您的问题。