Mdi形式确保可见

发布于 2024-07-16 08:30:47 字数 228 浏览 5 评论 0原文

我正在使用 MDI 表单开发 ac# .NET 应用程序。 当 Mdi 子项移动并使用滚动条时,某些表单将位于显示区域之外。 我想对 Mdi 子项执行类似于 TreeNode.EnsureVisible() 的操作,它会移动 TreeView 滚动条,直到节点完全可见。 调用 Form.Activate() 不会执行此操作。 我不介意是否需要 P/Invoke

感谢您的期待

Alex

I am developing a c# .NET app with MDI forms.
When the Mdi children are moved around and using the scroll bars some forms will be outside the displayed area.
I would like to do to the Mdi children something similar to TreeNode.EnsureVisible() which moves the TreeView scrollbars until the Node is fully visible.
Calling Form.Activate() doesn't do this.
I don't mind if P/Invoke is required

Thanks in anticipation

Alex

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

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

发布评论

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

评论(1

感情旳空白 2024-07-23 08:30:48

您可以在父窗口上调用方法ActivateMdiChild(childForm),这会将焦点带到childForm上。
华泰

You could call the method ActivateMdiChild(childForm) on the parent Window which bring the focus on the childForm.
HTH

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