Pen p = new Pen(Color.Black, 5);
Graphics g = this.panelControl2.CreateGraphics(); //this.CreateGraphics();
//DrawArrow(g, p, 50, 20, 100, 20);
p.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;//恢复实线
p.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;//定义线尾的样式为箭头
g.DrawLine(p, 10, 30, 200, 30);
p.Dispose();
g.Dispose();
转载于:https://www.cnblogs.com/fubin/archive/2009/01/02/1366819.html