Example Code

Event Driven Programming Using LabVIEW: Referencing The Mouse Wheel

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

The code attached is a simple example of using an event structure with the scroll wheel on the user's mouse. 

 

Description

This VI detects that the mouse wheel has been scrolled up or down and displays this on a row of LEDs on the front panel. The mouse wheel can be chosen by right-clicking on the event structure and choosing "Edit Events Handled by this Case". In the edit events window you will find "Mouse Wheel" under "Panes>>Pane". 

 

Requirements

  • LabVIEW 2013 (or compatible)

 

Steps to implement or Execute code

  1. Run the VI
  2. Scroll up or down on the computer's mouse and see how the LED display on the front panel

 

Additional Information or References

VI Block Diagram

 

 Mouse Wheel.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Peter T
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.