Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
Sergey Alexandrovich Kryukov 2-Jul-11 18:54pm    
What's so tricky? You do it in the client area, apparently, and you have all mouse events there to handle.
--SA

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900