MDI 子窗体之间的转换

发布于 2024-12-17 13:00:18 字数 108 浏览 7 评论 0原文

我有一个 MDI 窗体,并且我希望能够在子窗体之间切换。 有什么方法可以做到这一点吗?

我知道我可以使用 CTRL+F6 来实现这一点,并且我可以模拟这些键;但我想要一个简单的解决方案。

I have a MDI form, and I want to be able to shift between the child forms.
Is there any method to do this?

I know there I can use CTRL+F6 to achieve this, and I could simulate those keys; but I would like an easy solution.

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

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

发布评论

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

评论(2

孤蝉 2024-12-24 13:00:18

我完全忘记添加答案,但这里是:

this.SelectNextControl(this.ActiveControl, true, true, true, true);

I completely forgot to add the answer, but here it is:

this.SelectNextControl(this.ActiveControl, true, true, true, true);
牵你的手,一向走下去 2024-12-24 13:00:18

你可以使用:
this.MdiChildren[i].BringToFront()
其中 i 是您想要置于前面的表单的索引(它们按第一个打开的表单排序,即第一个,第二个是第二个,依此类推)

顺便说一句,
ctrl+tab 比 ctrl+F6 更容易...
(几乎适用于任何基于 Windows 选项卡的程序(fe chrome),与 ctrl+f6 不同)

you can use:
this.MdiChildren[i].BringToFront()
where i is the index of the form you want to bring to front (they are sorted by first one to open is the first, second is the second etc)

btw,
ctrl+tab is easier then ctrl+F6...
(works in almost any windows tab based program (f.e. chrome), unlike ctrl+f6)

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