How to use the Paint event to draw shapes at mouse coordinates
When drawing on a Control’s surface, you always use the Paint event of that Control or override the OnPaint method of a Custom/User Control. Do not try to store its Graphics object: it becomes invalid as soon as the Control is invalidated (repainted). Use the Graphics object provided by the PaintEventArgs object. When a more … Read more