LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse position always zero

Hello!
I am developing a rather big application in Labview ver 8.2.
I have a problem with getting the mouse position inside a picture.
The property node mouse->mouse position always returns (-1, -1) or (0, 0). The (-1, -1) returns if the mouse is positioned over a scrollbar.

My problem is that the (0, 0) is returned for every position inside the picture.

Now i  wonder if anybody has any suggestions how to get the mouse position to be returned correctly.

Best regards
Erik Johansson
0 Kudos
Message 1 of 7
(3,258 Views)
I cannot reproduce your problem. Can you attach a simplified program that shows the described behavior? Thanks!
0 Kudos
Message 2 of 7
(3,252 Views)
I have a hard time making a downscaled version of my program because it uses a GSM-modem and a database
0 Kudos
Message 3 of 7
(3,241 Views)
Are you saying that you cannot reproduce the problem if you reduce it to a very small program (e.g. a loop containing only an image, appropriate property node with indicator and a small wait statement)?
 
Where did your code come from? Was it converted from an earlier version or coded from scratch in 8.20? Have you tried deleting the current image indicator and creating a new one?
0 Kudos
Message 4 of 7
(3,224 Views)
Erik, try this VI. It just outputs the mouse position in the picture whenever you move the mouse. Is this how you're reading the property?
Message 5 of 7
(3,215 Views)
The code is in LabView version 2.80 from scratch.

I have deleted the indicator and replaces it with a new one and it worked. From the new one the mouse position is reported corectly.
0 Kudos
Message 6 of 7
(3,187 Views)
It is not the way I read the proerty. I read in a event-handler for the mouse-down event.
0 Kudos
Message 7 of 7
(3,186 Views)