I am trying to put a picture on a form and then when the user clicks
on the picture/image they can resize that image with the sizer arrows
(not the whole form, just the picturebox.) I thought this would be
via the locked property , but it did not allow me to click the
picture.
Does anyone have any idea how I can accomplish this? Thank you.
Morten Wennevik - 07 Sep 2004 09:18 GMT
Hi Jim,
I think you need to implement your own sizing code.
Handle the PictureBox MouseMove event to show a resize cursor near the borders.
On MouseDown and the cursor where at a border change the size based on user movements.
You might want to add a border to the picturebox when the user clicks on it to visualize 'edit mode'
--
Happy Coding!
Morten Wennevik [C# MVP]
Daniel Carlsson - 07 Sep 2004 16:45 GMT
Locked is used for locking the control in the designer.
There are some tutorials about how to use the designers in your own
application, but its much easier to write some code that listens to the
mouse events to rezise the code.
> I am trying to put a picture on a form and then when the user clicks
> on the picture/image they can resize that image with the sizer arrows
[quoted text clipped - 3 lines]
>
> Does anyone have any idea how I can accomplish this? Thank you.