Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Pointer position of graph

I have a waveform plot and want to get the coordinates of the mouse when it's over the plot. I tried using the AfterMoveCursor event but that doesn't seem to work. I'm using c#. Thanks

JMD
0 Kudos
Message 1 of 3
(3,628 Views)
The cursor in the AfterMoveCursor event refers to a cursor of the graph, not the mouse cursor. Use the static MousePosition property on the Windows Forms Control class to get the coordinates of the mouse cursor. Note that this position is returned in screen coordinates. If you need the coordinates in the control client coordinates, you can pass the coordinates returned from MousePosition to the PointToClient method on the waveform graph.

- Elton
0 Kudos
Message 2 of 3
(3,628 Views)
Ahh.... I had to add a cusor to the waveform. Now everything works as I would expect.

JMD
0 Kudos
Message 3 of 3
(3,628 Views)