LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Map coordinates to XY when mouse move only if mouse is down

Hi,

I want to continously read xy coordinates of the mouse position over the graph as long as mouse is down and ignore mouse move event when mouse is not down or is not over the graph. I achieved this functionality with attached VI. Is this done in a right way or do you have other solution?

 

Thanks in advance.

0 Kudos
Message 1 of 2
(2,738 Views)

Your version is possible, but it consumes CPU resources, because the events still occur.
In such cases, I use dynamic events.
When the mouse down event is registered with the real reference to graph. When the mouse up event is registered with an empty constant, so that the events are not generated and do not require resources.m.png

Message 2 of 2
(2,719 Views)