Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 513
artur_simon Avatar asked Oct 31 '12 21:10

artur_simon


1 Answers

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.

like image 122
xxbbcc Avatar answered Nov 09 '22 08:11

xxbbcc