Example Code

Monitoring Mouse Movement and Moving the Front Panel

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

Download All

Overview

Coding that exemplifies how to make the front panel moves while with the mouse while on a determined area.

 

Description

This is a VI might be used when wanting to move the front panel from a specific area, but does not want to have the menu bar. It takes the difference in current position vs last position and moves the front panel the same way. This shows how event structures can be useful in application control.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI
2. Place the mouse on the white square, click and move it.
3. Click on the stop button in order to finish the execution.

 

Additional Information or References

Capture.PNG

Chris Van Horn
Applications Engineer

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