LayoutMDI 除一个子窗体外的所有子窗体

发布于 2024-08-21 04:56:55 字数 214 浏览 6 评论 0原文

我有一个 MDI 应用程序,并且有一种使用子窗体创建的菜单,因此它保留在父窗口中。我想要的是,当我为除此表单之外的所有表单调用 LayoutMDI (或某些变体)时进行级联、平铺等,但我似乎找不到一种方法来做到这一点。

我尝试过重写 LayoutMDI,但这是不允许的(它不是虚拟的),而且我似乎无法在任何地方使用 if 语句来排除一个窗口。

有什么想法吗?

谢谢。

I have an MDI Application and have a sort of menu that has been created using a child form so it stays within the parents window. What I would like is when I call LayoutMDI (or some variation) for all but this form to be cascaded, tiled ect but I can't seem to find a way to do it.

I have tried overriding the LayoutMDI but that is not allowed (it's not virtual) and I can't seem to slap an if statement anywhere to exclude one window.

Any ideas?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝礼 2024-08-28 04:56:55

我建议您将代码更改为;

form.TopLevel=false;
form.Parent=this;

form.Show();

希望这能解决您的问题。

I suggest that you change your code to;

form.TopLevel=false;
form.Parent=this;

form.Show();

Hopefully this should resolve your problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文