zedgraphcontrol坐标系里怎么获取鼠标坐标?

m0_54690990 2021-02-04 10:08:58
zedgraphcontrol坐标系里怎么获取鼠标坐标?利用mousedown事件是鼠标左键坐标获取的是zedgraph的控件坐标,而不是我自定义的坐标系,怎么鼠标在控件中的坐标转换到自定义坐标系里? private float x3 = 0; private float y3 = 0; private float x4 = 0; private float y4 = 0; private bool ZedGraphControl4_MouseDownEvent(ZedGraph.ZedGraphControl sender, MouseEventArgs e) { x3 = 0; y3 = 0; x4 = 0; y4 = 0; zedGraphControl4.IsEnableZoom = true; x3 = e.X; y3 = e.Y; return default(bool); } private bool ZedGraphControl4_MouseUpEvent(ZedGraph.ZedGraphControl sender, MouseEventArgs e) { if (checkBox13.Checked) { zedGraphControl4.IsEnableZoom = true; } else { zedGraphControl4.IsEnableZoom = false; x4 = e.X - x3; y4 = e.Y - y3; } return default(bool); } private bool ZedGraphControl4_MouseMoveEvent(ZedGraph.ZedGraphControl sender, MouseEventArgs e)
...全文
114 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
源代码大师 2021-05-06
  • 打赏
  • 举报
回复
希望对你有帮助:https://blog.csdn.net/it_xiangqiang/category_10581430.html 希望对你有帮助:https://blog.csdn.net/it_xiangqiang/category_10768339.html
Tiger-3D 2021-02-04
  • 打赏
  • 举报
回复
不懂,可能需要自己换算

69,369

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧