I want to get the coordinate value of any mouse position on the Zedgraph control, isshowcursorvalues can show the value of the mouse position but cannot extract the assigned value to other variables. With Pointvalueevent This event can only get the coordinates of the points that have been drawn, and I want to get the coordinates of any position.
C.mousedownevent + = new Zedgraphcontrol.zedmouseeventhandler (Mymousedown);
protected bool Mymousedown (object sender, MouseEventArgs e)
{
pdown.x = e.x;
PDOWN.Y = e.y;
return true;
}
Or
private void Zedgraph1_mouseclick (object sender, MouseEventArgs e)
{
PointF mousept = new PointF (e.x, e.y);
Graphpane pane = ((Zedgraphcontrol) sender). Masterpane.findchartrect (mousept);
if (pane! = null)
{
Double x, y;
Pane. Reversetransform (mousept, out X, out y);
MessageBox.Show (x+ "" +y);
}
}
Zedgraph how the control gets the coordinate value of the mouse position (reprint)