LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Set mouse position

Somebody knows if is it possible to move the mouse pointer to anywhere
I want, something like SetGlobalMouseState... or a way to create a
similar function?
I'm working with images instead of buttons so this would be the only
way to maintain the mouseOver functions while using KEYPRESS events to
move along the menu options.
0 Kudos
Message 1 of 3
(3,246 Views)
Hi,

Since a mouse is an input device CVI only offers functions like
GetRelativeMouseState to read the state of the mouse. There is a
function in the Windows DSk called mouse_event. I
know you can use that function to generate mouse events. I'm not sure
if this will move the mouse once an event is generated. You can find
more informatin on this function in the Windows SDK help.

Just my 2 cents.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 3
(3,246 Views)
Thanks,
I've finally resolved it using a Windows API which has a function called SetCursorPos(x,y). It needs "windows.h" to be included and "user32.lib" library added to project.
Image Hosted by ImageShack.us
Message 3 of 3
(3,246 Views)