110,533
社区成员
发帖
与我相关
我的任务
分享
Point opt = Point.Empty;
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
Graphics g= this.CreateGraphics();
Point npt = new Point(e.X, e.Y);
if (opt.IsEmpty) opt = npt;
Pen p = new Pen(System.Drawing.Color.Red);
p.Width = 1;
g.DrawLine(p, opt, npt);
opt = npt;
}