The control
System.Windows.Forms.PictureBox
is not suitable for such operations. Yes, you can implement them, but the control functionality won't help you; it will only present extra hassles, eat up extra resources and your development time giving nothing in return. Don't torture yourself — this control is designed only for the simplest cases, with static or almost static (rarely replaced) preexisting images.
What you really need is using a custom control derived from
System.Windows.Forms.Control
; the image should be rendered in the overridden method
OnPaint
. Please see my past answer explaining further detail:
How do I clear a panel from old drawing[
^],
draw a rectangle in C#[
^],
Append a picture within picturebox[
^].
See also:
Drawing Lines between mdi child forms[
^],
capture the drawing on a panel[
^],
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[
^].
—SA