Resize picturebox at runtime

SEVI

Freshman
Joined
Jun 28, 2003
Messages
48
Location
Australia
Has anyone seen any good resources for resizing controls particularly a picturebox at runtime. I'm using handles and wish to resize from all sides and corners. ie.

Decrease/Increase height from top
Decrease/Increase height from bottom
Decrease/Increase width from left
Decrease/Increase width from right
Decrease/Increase height/width from top/left etc

I can never seem to get resizing working as smooth as I'd like and was hoping that was some working code around the place.

Cheers
 
If you are trying to get some kind of smooth animation or fast resizing with no flicker then don't use a picturebox, draw directly to the form in an overriden OnPaint event.
 
I'll detail what I mean:
Basically what I am trying to do is have a series of pictureboxes inside a main picturebox. The parent picturebox will be able to generate an image of all it's contents, including the contents of it's children. I need the child boxes to be resizable at runtime, in every which way to be able to increase the size of it's image. It is a solution to compose images.

I'm really after just some effective calculations for resizing in various directions.

Thx
 
You could make your own control and have child controls that are pictureboxes. Then you could easily use the Location property without having to subtract from the size of the form.

Here is an example: I made a control called a DrawingSurface in this program.
 

Attachments

Last edited by a moderator:
hi,
i am in Need of the PictureBOx , which can Be Resized and Moved, i hope u can help me out, its Urgent,

Thanks in Advance,
 
Back
Top