Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Capturing Left and Right Click Up Mouse Events in LabWindows/CVI

Primary Software: LabWindows/CVI Development Systems>>Base Package
Primary Software Version: 8.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
Is it possible to capture left and right click up mouse events in LabWindows/CVI?

Solution:
LabWindows/CVI 8.1 introduced several new events including:
  • EVENT_MOUSE_POINTER_MOVE
  • EVENT_LEFT_CLICK_UP
  • EVENT_RIGHT_CLICK_UP
  • EVENT_MOUSE_WHEEL_SCROLL
If you need to capture the left and right click up mouse events, you can use the EVENT_LEFT_CLICK_UP and EVENT_RIGHT_CLICK_UP events.

If you are using LabWindows/CVI 8.0.1 and earlier, you can use the function, EnableExtendedMouseEvents which enables a control to receive additional mouse events in addition to the built-in mouse events. Those additional events are EVENT_MOUSE_MOVE, EVENT_LEFT_MOUSE_UP and EVENT_RIGHT_MOUSE_UP.

Note. In LabWindows/CVI 8.1 and later, the EnableExtendedMouseEvents function is considered obsolete. National Instruments recommends that you instead use the previously mentioned built-in LabWindows/CVI events. Use EnableExtendedMouseEvents if you need to get event information when a user releases the left or right mouse buttons outside of a LabWindows/CVI panel.

Related Links:
Developer Zone Tutorial: Retrieving Mouse States
KnowledgeBase 0GHA3UZL: Monitoring Mouse Position in LabWindows/CVI

Attachments:





Report Date: 12/05/2006
Last Updated: 12/29/2006
Document ID: 4449ACGJ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit