Example Code

Handling .NET Events in LabVIEW

Code and Documents

Attachment

The attached example program demonstrates how to register for and handle a .NET event in LabVIEW.

The example contains a .NET User Control Library (Assembly) that has a button on it.
This User Control Library is embedded in the LabVIEW Front Panel in a .NET Container.
In the Block Diagram, we get a reference to the button, register for the button click event and specify a callback VI to handle the event.

This can be done with a regular .NET Assembly that doesn't contain a UI as well.

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

Contributors