From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

.Net Message Error Box

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

Use of the .Net Framework to call a user message box.

 

Description

Windows users with the .net framework installed can use this as an alternative to the LV Dialog Boxes.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Ensure the .Net reference is pointing the System.Windows.Forms.MessageBox class.
2. Insert the Text and Caption you would like to display.
3. Run the VI.


Additional Information or References

Capture.PNG


Thank You
Eric Reid
National Instruments
Motion R&D

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

Comments
Todd S.
NI Employee (retired)
on

Good stuff, thanks for posting.  Do you mind renaming your attachment to include the LabVIEW version?  "_lvXX.vi" would be good enough.  Thanks!

Todd S.
LabVIEW Community Manager
National Instruments
battler.
Active Participant
Active Participant
on

Isn't .NET framework even required to run the LV RTE regardless?  So if LV can run then this .NET call should run??