Example Code

Move Mouse Without Event Structure.

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
To move the mouse without using an event structure to figure out the coordinates value

Description:
I wrote this VI to move the mouse without using an event structure. This is useful because sometimes you may want to move the mouse without having it inside the VI's pane.
It uses the User32.dll and is very simple. I also have included a second call to User32.dll which finds the current co-ordinates of the mouse.

Instructions:
To implement this example:

  1. Run the VI
  2. See the Current Mouse Position to know the current position
  3. Input the value of the cursor and select Move Mouse to move the cursor


To execute this example:

  1. Install the required software.
  2. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

bd.pngfp.PNG

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

Owen.S
Applications Engineer
National Instruments

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

Comments
OctavioGtz
Member
Member
on

This is a nice sample.

Thank you!