System.Drawing.Drawing2D.GraphicsPath graphPath=new System.Drawing.Drawing2D.GraphicsPath();
graphPath.AddLine(new Point(100, 100), new Point(200, 200));
Graphics g=this.panel1.CreateGraphics();
graphPath.AddLine(new Point(100, 100), new Point(200, 200));
Pen p = new Pen(Color.Red, 10);
g.DrawPath(p, graphPath);我画了一个线段,如果鼠标点中它,提示一个信息,在线等。。