pictureBox1.CreateGraphics().CompositingQuality = CompositingQuality.GammaCorrected;
pictureBox1.CreateGraphics().DrawLine(new Pen(System.Drawing.Color.FromArgb(255, 0, 0, 255)),
P,P2);
pictureBox1.CreateGraphics().DrawLine(new Pen(System.Drawing.Color.FromArgb(255, 0, 0, 255)),
P,P2);
我是在Paint中绘图,我不明白的是两种引用方式,e.Graphics.DrawLine()可以绘出来,而PictureBox1.CreateGraphics().DrawLine()就不行。