private Point LastPoint { get; set; }
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
label2.Text = "x:" + e.X;
label3.Text = "y:" + e.Y;
if (drawing == true)
{
Graphics graphics = CreateGraphics();
SolidBrush brush = new SolidBrush(color);
if (LastPoint == null)
graphics.FillEllipse(brush, e.X, e.Y, size, size);
else
graphics.DrawLine(new Pen(brush, size), LastPoint, new Point(e.X, e.Y));
}
LastPoint = new Point(e.X, e.Y);
}
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-23013-1.html
@老子起个昵称怎么就那么难@郑甜甜的辛普森美美美