C# paint program flickering
问题 I'm trying to make a simple paint program in C#, but it keeps flickering when I'm drawing, like I need some kind of double buffering, but I don't know how to do it. I am drawing on a Panel and I'm using a Bitmap to store the graphics. Here's my code: public partial class Form1 : Form { private Bitmap drawing; private bool leftDown = false; private int prevX; private int prevY; private int currentX; private int currentY; public Form1() { InitializeComponent(); drawing = new Bitmap(panel1.Width