Home > Back-end >  How to get the mouse coordinates in the zedgraphcontrol coordinate system?
How to get the mouse coordinates in the zedgraphcontrol coordinate system?

Time:02-06

How to get the mouse coordinates in the zedgraphcontrol coordinate system? Using the mousedown event is left key of mouse coordinates obtained is zedgraph control coordinates, rather than my custom coordinate system, how the mouse in coordinate conversion of control to the custom in the coordinate system?
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)
{
The x3=0;
Y3=0;
X4=0;
Y4=0;
ZedGraphControl4. IsEnableZoom=true;
The x3=e.X;
Y3=e.Y;
Return the default (bool);
}
Private bool ZedGraphControl4_MouseUpEvent (ZedGraph ZedGraphControl sender, MouseEventArgs e)
{
If (checkBox13. Checked)
{
ZedGraphControl4. IsEnableZoom=true;
}
The else
{
ZedGraphControl4. IsEnableZoom=false;
X4=e.X - x3;
Y4=e.Y - y3.
}
Return the default (bool);
}
Private bool ZedGraphControl4_MouseMoveEvent (ZedGraph ZedGraphControl sender, MouseEventArgs e)

CodePudding user response:

Do not understand, may need your conversion
  • Related