Should I use a PictureBox or a Panel to draw on my Form?

c#, graphics, panel, picturebox, winforms

Solution

Use a `PictureBox` - it'll be easiest to maintain the code later on. A `Panel` is not really useful in this case and drawing directly on the `Form` - while it'd work - would make it harder to make changes later on.

Just handle the `Paint` event of the `PictureBox` and do all your drawing in there.

Problem

Is there a recommended one to use in order to add lines and circles, so I can build a graph? I will possibly work with background images under the graph itself.

Original source