How to Suppress Warning Dialogs When Using the NI-DCPower .NET API

Updated Jul 30, 2026

Environment

Driver

  • NI-DCPower

This article explains how to disable warning pop-up windows when using the NI-DCPower driver through custom .NET code. This procedure is intended for developers who want warning conditions to be reported programmatically without displaying warning dialog windows during application execution.

  1. Open your custom .NET project that uses the NI-DCPower API.
  2. Locate the line of code responsible for displaying warning pop-up windows, as shown in your code screenshot.
  3. Comment out the identified line. 
  4. Save the changes to the source code.
  5. Rebuild the application.
  6. Run the application and verify that warning conditions are no longer displayed as pop-up windows.

After commenting out the warning-dialog line, warning pop-up windows will no longer appear when the NI-DCPower driver reports a warning.

Next Steps

  • Implement application logging if warning information still needs to be captured for troubleshooting purposes.
  • Review existing warning-handling logic to ensure important driver warnings are not missed after disabling the dialog window.