LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

is there anyway to read status of the mouse buttons?

I need to read left button status (Pressed or not pressed)for my application.
Is there anyway to get mouse status?
Thanks.
Sheetal
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 1 of 3
(3,098 Views)
I got my answer by looking at CVI mouse example.
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 2 of 3
(3,098 Views)
CVI has some mouse events. The Programmer's Toolbox adds more.
In the callback for the control or panel you want to watch, you can add cases for the following events:
EVENT_LEFT_CLICK
EVENT_LEFT_DOUBLE_CLICK
EVENT_RIGHT_CLICK
EVENT_RIGHT_DOUBLE_CLICK
The following additional mouse events are available after you load the Programmer's Toolbox and call EnableExtendedMouseEvents().
EVENT_MOUSE_MOVE
EVENT_LEFT_MOUSE_UP
EVENT_RIGHT_MOUSE_UP
If you want to check the mouse status in combination with another event, you can set a global in the mouse event, and then check the global later.
The normal CVI programming paradigm is event driven: you don't check the mouse status on demand but you watch for events and save status you want from events.
0 Kudos
Message 3 of 3
(3,098 Views)