Say i have a pictureBox.
Now what i want is that user should be able to resize the pictureBox at will. However i have no idea on how to even start on this thing. I have searched internet however information is scarce.
Can anybody at least guide me on where to start ?
here is an article
http://www.codeproject.com/Articles/20716/Allow-the-User-to-Resize-Controls-at-Runtime
that should help you since it in vb here a C# translation
AND RE-SIZE FUNCTION
with use ControlMoverOrResizer class in this article you can do movable and resizable controls in run time just with a line of code! :) example:
ControlMoverOrResizer.Init(button1);
and now button1 is a movable and resizable control!
Create a new c# winform application and paste this:
Don't forget to say thanks when it help you...
http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=743923&av=1095793&msg=4778687
Regards, Kix46
This is pretty easy to do, every window in Windows has the innate ability to be resizable. It is just turned off for a PictureBox, you can turn it back on by listening for the WM_NCHITTEST message. You simply tell Windows that the cursor is on a corner of a window, you get everything else for free. You'll also want to draw a grab handle so it is clear to the user that dragging the corner will resize the box.
Add a new class to your project and paste the code shown below. Build + Build. You'll get a new control on top of the toolbox, drop it on a form. Set the Image property and you're set to try it.
Another very cheap way to get the resizing for free is by giving the control a resizable border. Which works on all corners and edges. Paste this code into the class (you don't need WndProc anymore):