LabVIEW allows you to embed a .NET Control on a VIs front panel that users can interact with during runtime. The .NET Container (Controls Palette » .NET & ActiveX » .NET Container) allows you to specify an assembly and the control within the assembly that you want to embed.
The .NET Container has a Block Diagram node that is a reference to the control, and can be wired to .NET Property Nodes and .NET Invoke Nodes to access properties and methods of the control.
For example, to create a System.Windows.Forms.TextBox .NET Control:
One of the inherent benefits of LabVIEW is that it will create automatically create multiple threads for operations that are not dependent on each other. For instance, two while loops will automatically run on separate threads (unless one while loop has an input that is waiting on an output from the other while loop).
However, this can cause issues when trying to update a .NET Control from LabVIEW. If the code that is updating a .NET Control isn’t running on the same thread that created the control (the UI thread), then .NET can throw an exception. This is done as a safety mechanism to prevent multiple threads from updating the UI in an unsafe manner.
The workaround for this is to force the UI update to run on the UI thread. To do this, you can use the Invoke method of the UI object and specify a function (using a delegate) that will update the UI.
An example of this is shown at:
Attached is an example application showing how this from LabVIEW:
The following examples install with LabVIEW:
Calculator VI: labview\examples\comm\dotnet\Calculator.llb
SimpleTaskMonitor VI: labview\examples\comm\dotnet\SimpleTaskMonitor.llb