Hi Stoyo,
Still way back on v4.2.2.19341 (we will upgrade when we get a breathing point)
I am trying to get a mouse position on the chart. I understand on any MouseEventArgs, we can do a ClientToDoc to ascertain my position, but on other occasions, such as ContextMenuStrip_Opening event, I have no more knowledge (than I am aware of) of where my mouse is over the MousePosition property of the owning Form. I have tried all combinations of client, screen, point and doc methods, but none seem to get be an absolute position on the chart.
I guess I could figure the form location, the location of the chart on the form (to add complexity, it is in a docking panel).
In the past I have hacked around this quite horribly, but I want an elegant solution moving forward, if possible.
One attempt (shown below), I have inherited FlowChart to PelionFlowChart, with a few base functions I appear to be coding over and over, as well as a capturing the MouseMove event (and bubbling it up to the PelionFlowChart) to keep a 'current position' variable. The problem I have found now is that MouseMove does not fire when I am Dragging into the chart from a tree (or possibly from the chart as well, but I haven't tested that),
and the x, y variables in the DragOver event appear as unhelpful as the form's Mouse Position. ([edit:] The X,Y variables are helpful, I was declaring a new Point object to store my _mousePosition into, instead of using the global scoped one
).
[edit:] I have a work around now, as shown below, but can you advise on a more elegant solution?
Thanks again, in advance
JC