LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Get System Cursor Info Using LabVIEW 2019 Win10?

How to Get System Cursor Info Using LabVIEW 2019 Win10?

Please help

This example below does not work.

https://forums.ni.com/t5/Example-Code/Get-System-Cursor-Info-win-API-and-NET-Using-LabVIEW/ta-p/3510...

0 Kudos
Message 1 of 14
(3,787 Views)

That should still work as it always did (not sure if it did), but not if you're using LabVIEW 64 bit.

 

On LV 64 bit, pointers need to be converted to 64 bit integers.

 

Not sure why that link broke, could be this one:

https://forums.ni.com/t5/LabVIEW/Get-Mouse-Cursor/td-p/3228983

 

If you want the mouse position, there are easier ways...

0 Kudos
Message 2 of 14
(3,747 Views)

Thanks a lot.

I need to catch the moment mouse pointer changes from arrow to hand.

Maybe I chose the wrong method?
Thanks in advance

0 Kudos
Message 3 of 14
(3,740 Views)

@AntMeTech wrote:

Thanks a lot.

I need to catch the moment mouse pointer changes from arrow to hand.

Maybe I chose the wrong method?


That won't be easy no matter the method.

 

You'd be polling, and with polling there's always the chance you miss the event.

 

Why do you want this? In some cases you could use mouse enter event.

0 Kudos
Message 4 of 14
(3,727 Views)

I need to use it outside the front panel of VI (pointer changes when hovering above the hyperlink in web page for example).

0 Kudos
Message 5 of 14
(3,725 Views)

I'd hook the mouse proc.

 

Not easy, but I recently did this for the keyboard.

 

Also, no guarantee that it will in fact detect this change. It will at best detect an event that triggers this change. Not sure if these events are distinguishing enough to actually detect the wanted change.

 

So, lots of work, maybe for nothing...

 

See Tracking-cursor-change, especially the suggested reading list.

0 Kudos
Message 6 of 14
(3,723 Views)

Might you share your code?(snippet)
I am not so experienced with this stuff.
Thanks.

0 Kudos
Message 7 of 14
(3,718 Views)

@AntMeTech wrote:

Might you share your code?(snippet)
I am not so experienced with this stuff.
Thanks.


I am, but it will take some time.

 

There's a rudimentary version here. Subscribe to that thread, I'll post an update there when it's online. This one is 64 bit only for now, and (testing) the 32 bit version is what is stopping me from posting a more definitive version.

 

It's probable that I will adjust it to the mousehook myself a while after the keyboard code is done.

0 Kudos
Message 8 of 14
(3,709 Views)

Thanks a lot.

0 Kudos
Message 9 of 14
(3,706 Views)

Is there a mouse enter/leave event for the front panel?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 14
(3,651 Views)