Example Code

Programmatic Mouse Click Enable a Grayed Control in LabVIEW

Code and Documents

Attachment

Overview

This code allows the user to "recover" a control that is disabled or grayed out.

 

Description

When a front panel control is disabled and grayed, it can be set to be enabled by clicking it. In this case, the user would still have to click the button again in order to bring up the menu to make their selection. By programatically initiating another mouse click, the same control can be enabled and then display the menu with a single click from the user.

Create a event structure that calls into the User32.dll to initiate a programmatic mouse click immediately after the first click. 

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run VI
  2. Click in the Ring Control

Additional Information or References

5814.png

 

**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.