cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse Control

Mouse Control

Does anyone have examples or tutorials of controlling the mouse pointer in Labview?
8 REPLIES 8
nutmegzzzz
Member

Re: Mouse Control

Did you want to have the computer position the mouse or do you want the computer to read the mouse position?
tst
Knight of NI Knight of NI
Knight of NI

Re: Mouse Control

Message contains a hyperlink
You can make a call to the windows API and use SetCursorPos from User32.DLL (Example).

___________________
Try to take over the world!

Re: Mouse Control

Hi!

What exactly u want to do with mouse?

U want to control the pointer or u want to control the mouse position on FP?

If u want to control pointer then u can use event structure . register the event take action

and then unregister.

If you required some specific, tell me.

 

Jenilia D'souza
rodrigo_c
Member

Re: Mouse Control

Message contains a hyperlink
"You can make a call to the windows API and use SetCursorPos from User32.DLL (Example). "
 
Very good, thanks!!!
 
my english is bad, sorry!
 
How use  click event??? I want to do CLICK? Automatic
 
Thank you!!!
tst
Knight of NI Knight of NI
Knight of NI

Re: Mouse Control

I don't have any example code at the moment, but you can call PostMessage, Mouse_event or SendInput to simulate the click. I think that in all of them you will have to "push" the button down and then "release" it. You can try searching here for some code or go to the MSDN and look at the documentation for those functions. The first 2 are fairly easy to use.

___________________
Try to take over the world!
Highlighted

Re: Mouse Control

Hi everybody, my english is so bad but I will try,  , I'm working with an application using the mouse as a joystick in labview, in this moment I can move 5 axis with the mouse but I'm using the scroll wheel and my screen is moving when I'm working with that axis, do you know how to disable screen movement from scroll wheel in  labview when my program is running?
Christian Landeros
tst
Knight of NI Knight of NI
Knight of NI

Re: Mouse Control

  1. Open your VI.
  2. Go to File>>VI Properties>>Window Appearance.
  3. Click Customize.
  4. Uncheck Show scroll bars.

When the scroll bars are gone, scrolling the mouse wheel should not scroll the front panel.


___________________
Try to take over the world!

Re: Mouse Control

thank you, it was very easy, all of you are monsters in this field,
Christian Landeros