How to draw onto a PictureBox image when control resizes?
Posted
by Sam Mackrill
on Stack Overflow
See other posts from Stack Overflow
or by Sam Mackrill
Published on 2010-04-01T15:37:27Z
Indexed on
2010/04/01
16:23 UTC
Read the original article
Hit count: 464
winforms
|picturebox
I am using the pictureBox_Paint event to try and draw an overlay onto the image in a PictureBox. This is working fine until I resize the PictureBox (set to use SizeMode.Zoom), when I do this the overlay graphic is drawn off position by the margin between the image and the edge of the PictureBox. I guess I need to use the ImageRectangle somehow but this is not public.
© Stack Overflow or respective owner