PictureBox Locked Property Question

  • Thread starter Thread starter jm
  • Start date Start date
J

jm

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.
 
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'
 
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.
 
Back
Top