Example Code

Setting Cursor Position Programmatically With LabVIEW

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

Description

Overview


This Set Cursor Position VI sets the position of the mouse cursor on the screen programmatically. The VI uses the Call Library Function Node to call the Windows SDK function SetCursorPos.

This Set Cursor Position VI sets the position of the mouse cursor on the screen programmatically. The VI uses the Call Library Function Node to call the Windows SDK function SetCursorPos.

You can modify the Set Cursor Position VI to position the mouse cursor programmatically in LabVIEW. In this example, select the horizontal pixel position of the cursor using the x position control. Use the y position control to select the vertical pixel position of the cursor.

See Also:
Using External Code in LabVIEW

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