cfz379945430
[quote=引用 6 楼 mdjs198 的回复:] [quote=引用 4 楼 cfz379945430 的回复:] private void zedGraphControl1_MouseMove(object sender, MouseEventArgs e) { using(Graphics gc = zedGraphControl1.CreateGraphics()) using(Pen pen = new Pen(Color.Gray)) { pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; RectangleF rect = zedGraphControl1.GraphPane.Chart.Rect; //确保在画图区域 if (rect.Contains(e.Location)) { zedGraphControl1.Refresh(); gc.DrawLine(pen, e.X, rect.Top, e.X, rect.Bottom); } } }
[quote=引用 4 楼 cfz379945430 的回复:] private void zedGraphControl1_MouseMove(object sender, MouseEventArgs e) { using(Graphics gc = zedGraphControl1.CreateGraphics()) using(Pen pen = new Pen(Color.Gray)) { pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; RectangleF rect = zedGraphControl1.GraphPane.Chart.Rect; //确保在画图区域 if (rect.Contains(e.Location)) { zedGraphControl1.Refresh(); gc.DrawLine(pen, e.X, rect.Top, e.X, rect.Bottom); } } }
private void zedGraphControl1_MouseMove(object sender, MouseEventArgs e) { using(Graphics gc = zedGraphControl1.CreateGraphics()) using(Pen pen = new Pen(Color.Gray)) { pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; RectangleF rect = zedGraphControl1.GraphPane.Chart.Rect; //确保在画图区域 if (rect.Contains(e.Location)) { zedGraphControl1.Refresh(); gc.DrawLine(pen, e.X, rect.Top, e.X, rect.Bottom); } } }
111,119
社区成员
642,545
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧