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.

Re: PictureBox Locked Property Question by Morten

Morten
Tue Sep 07 03:18:41 CDT 2004

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]

Re: PictureBox Locked Property Question by Daniel

Daniel
Tue Sep 07 10:45:36 CDT 2004

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.

"jm" <john_20_28_2000@yahoo.com> wrote in message
news:c67e4bdd.0409061608.7344b338@posting.google.com...
> 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.