Winforms MDI“桌面"区域边界 [英] Winforms MDI "Desktop" Area Boundry

查看:91
本文介绍了Winforms MDI“桌面"区域边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认的MDI父控件具有一个较大的桌面"区域,可以显示多个子窗体.用户可以将表单拖动到此桌面区域的边缘,以便大多数子表单不在屏幕上. (然后,滚动条出现在MDI父级中)我不喜欢此功能.有没有一种方法可以锁定桌面区域的边缘,以使子窗体保持完全可见?

The default MDI parent control has a large "desktop" area that can display multiple child forms. Users can drag forms to the edge of this desktop area so that most of the child form is off the screen. (A scroll bar then appears in the MDI parent) I don't like this feature. Is there a way to lock down the edge of the desktop area so that the child forms remain fully visible?

推荐答案

  1. 禁用MDI窗口滚动条
  2. 挂钩所有子窗口的OnMove事件.如果窗口移出边界,则将其沿x和y方向弹回",直到回到父级内部.

这篇关于Winforms MDI“桌面"区域边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆