You should not draw any graphics using
PictireBox
control. For this purpose, it's much better to use a custom control, derived from
System.Windows.Forms.Control
. It so happened that the name "picture box" mislead many beginners who try to abuse this control. It is possible to draw on this control and even implement some interactive or animated functionality… it makes no sense at all, because
this control does not help drawing at all; just the opposite, it adds some hassled and eats additional resources and development time, reduce performance. It was designed for a simple purpose: display a static image, for people who would not want to know anything about graphics rendering.
As you really need to draw something, you just trying to use totally
wrong control not designed the this purpose.
I'll explain you how to draw using GDI. Please see my past answers:
How do I clear a panel from old drawing[
^],
draw a rectangle in C#[
^],
Append a picture within picturebox[
^].
See also these answers on rendering and related detail:
Drawing Lines between mdi child forms[
^],
capture the drawing on a panel[
^],
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[
^].
—SA