public Form1() { InitializeComponent(); picture.Image = new Bitmap(picture.Width, picture.Height); Graphics graph = Graphics.FromImage(picture.Image); ShapePainter LinePainter = new LinePainter(this, button2, graph); ShapePainter TrianglePainter = new TrianglePainter(this, button5, graph); ShapePainter QuadPainter = new QuadPainter(this, button3, graph); ShapePainter RectPainter = new RectPainter(this, button4, graph); ShapePainter EllipsePainter = new EllipsePainter(this, button6, graph); ShapePainter CirclePainter = new CirclePainter(this, button7, graph); }