First I'm drawing one line
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawLine(System.Drawing.Pens.White, dx1, dy1, dx2, dy2);
}
then I'm in other function changing variables dx1
, dy1
, dx2
, dy2
and calling pictureBox1.Refresh();
After that I have a new line painted, but old one disappeared. How can I add a new one without disappearing of old one?