如何在调整大小时仅显示winforms窗口的边框?
我想在调整大小时禁用窗口内容的显示,可以吗?问题是,当我调整窗口大小时,控件会在正确的位置重绘,但看起来不太好,因为它做得不流畅。
编辑:我想要一个可以管理以下场景的代码:
- 我单击窗口的一角
- 现在只有窗口的边框可见 - 中间部分是透明的
- 我通过鼠标设置窗口的大小
- 我释放鼠标按钮并窗口的中间部分将出现
编辑 II:
我有 MDI 应用程序,它不支持子窗口的透明度
I would like to disable displaying of the content of the window when resizing, is it possible? The problem is that when I'm resizing my window the controls redraw on correct positions but it doesn't look good because it's not done fluently.
EDIT: I would like a code that would manage the following scenario:
- I click on the corner of window
- Now only the border of window is visible - the middle part is transparent
- I set the size of the window by mouse
- I release the mouse button and the middle part of the window will appear
EDIT II:
I've got the MDI application and it doesn't support transparency for child windows
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一个想法是将所有控件放在一个面板中,并在窗体的调整大小事件上将其可见性设置为 false。
编辑:这将使表单在调整大小时变得透明。
An idea is to put all the controls in a panel and set it's visibility to false on the resize event of the form.
Edit: this will make the form transparent while resizing.