From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Virus scan in progress. Please wait to download attachments.
Overview This example demonstrates how to determine the mouse coordinates relative to the Front Panel's origin (gray dot).
Description This example demonstrates how to determine the mouse coordinates relative to the Front Panel's origin (gray dot) by using VI Server references to determine the Front Panel's position relative to the origin and relative to the user's screen, and using these coordinates to calculate the mouse's position relative to the origin through the fomula.
Mouse Coordinates relative to Front Panel Origin = Local Pane Coordinates - Global Pane Coordinates + Mouse Coordinates
Requirements
LabVIEW 2013 (or later)
Steps to Implement or Execute Code
Run the VI
Additional Images or Video
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.