LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse Move Event Outside vi

Hello Everyone,
 
                I need to detect the mouse move event outside a vi. Whenever I move mouse on any part of the screen, I should detect it in a vi that may even run minimised. Please give your suggestions.
 
Thanks,
Vasanth.
Ya Ya
0 Kudos
Message 1 of 15
(3,777 Views)
Hi, Ya Ya,

You can use Acquire Input Data.vi like shown on the screenshot below:

VI also in attachment (LV 8.2)

best regards,

Andrey.
0 Kudos
Message 2 of 15
(3,769 Views)
        Thank you Mr.Andrey. I need to know whether the mouse have moved or not. How can I know that? Is there any event available for that?
 
Thanks,
Vasanth.
Ya Ya
0 Kudos
Message 3 of 15
(3,765 Views)
Hi,
 
I'm not sure that you will be able to get mouse event within VI without polling.
Theoretically you must create Hook-DLL, which will collect mouse activities and then will set occurence in LabVIEW. Relative complicated...
But if you need event, then you can fire event programmatically as shown on the screenshot below:
best regards,
 
Andrey.
0 Kudos
Message 4 of 15
(3,758 Views)
Andrey,
 
            That is great! This is what I exactly wanted to do. Thanks for your help.
 
Thanks,
Vasanth.
Ya Ya
0 Kudos
Message 5 of 15
(3,755 Views)
Andrey,
 
           Is there a way I can capture this event in the OS level? i.e, directly registering the OS level event onto LabVIEW user event?
 
Thanks,
Vasanth.
Ya Ya
0 Kudos
Message 6 of 15
(3,731 Views)
Yes You can,

you should find the .net event for the mouse movement and create a callback VI which will react on the .net event

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 7 of 15
(3,720 Views)

Ton,

Good idea, but I'm not sure that its can be done only with .net, because the .net Framework provides no built-in facilities to handle hooks.

But if you will found the .net event, please post example. Its a very interesting for me too. Thanks!

Andrey.

0 Kudos
Message 8 of 15
(3,707 Views)
Check this site in the NI website that instructs how to handle the windows messages in LabVIEW
 
 
Ya Ya
0 Kudos
Message 9 of 15
(3,676 Views)

Though this helps only for handling the mouse messages over the specified VI.

Thanks,

Vasanth.

Ya Ya
0 Kudos
Message 10 of 15
(3,675 Views)