ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dot net event handler

Hi!

 

 

Creating .Net objects, I can call a constructor, with EventHandler parameter. Is this parameter revelant in Labview? So Can I use this constructor for Event handling for LV event handlers, or not?  ( Not beacuse I have to register a .Net event with a special method. "Register .Net Event") 

 

ToolStripItem(String, Image, EventHandler, String)

 

Thanks!

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 1 of 2
(2,975 Views)

You can create a VI that will receive the .NET event. This VI can in turn be registered in LabVIEW to be handled by an event structure.

 

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/register-event-callback.html

 

I created an example long ago that uses the .NET PowerModeChanged Event to detect when the computer switches between UPSbattery and AC power. It also works for laptops...

 

https://forums.ni.com/t5/Example-Code/NET-PowerModeChanged-Notifier-Monitor-your-UPS-or-Laptop-Power...

0 Kudos
Message 2 of 2
(2,957 Views)