边框从resize inc#减少 [英] border less from resize inc#

查看:111
本文介绍了边框从resize inc#减少的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有无边界形式.我想使用鼠标来调整它的大小,就像带有边框的表单一样.问题是,调整大小应该看起来像是调整大小形式的调整大小.我的意思是,当您拖动一个较大的表单时,一个矩形指示该表单的虚拟大小,在您松开鼠标按钮后,该表单将重新调整到该位置.我想知道如何获取该矩形以定义表单要假定的大小.我希望我已经说清楚了.这个问题有点棘手.请帮我.




谢谢

i have a borderless form. I want to resize it using the mouse just like a form with a border. The thing is, the resizing should just look like the resizing of a sizable form. I mean, when u drag a sizable form, a rectangle indicates the virtual size of the form, after u let go the mouse button, the form rersizes to that position. I want to know how to get that rectangle to define the size the form is gonna assume. I hope i have made myself clear. The problem is a little tricky one. Plz help me.




thanks

推荐答案

调整表单大小时,它只是调整大小.但是,您可以捕获鼠标(Mouse.Capture),然后直到抬起鼠标按钮,跟踪鼠标的移动并将正方形绘制到桌面上. 此处 [
When I resize a form, it just resizes. But, you can capture the mouse (Mouse.Capture) and then until the mouse button is lifted, track mouse movement and draw your square on to the desktop. Here[^] is some code that does this.


这篇关于边框从resize inc#减少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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