|LabVIEW 2016 Help|
|LabVIEW 2017 Help|
|LabVIEW 2018 Help|
|LabVIEW 2019 Help|
|LabVIEW 2020 Help|
Owning Palette: ActiveX Functions
Requires: Base Development System
Registers a VI to be called when an event occurs. You use this function to register and handle .NET and ActiveX events. LabVIEW uses the type of the input reference wired to each item to determine the events for which you can register.
You can resize the function to register multiple event callbacks at once for the same .NET or ActiveX object or for a different object.
|Note If you wire Register Event Callback functions together by wiring the event callback ref out output of one function to the event callback ref input of another function, the last function in the series overwrites all the previous Register Event Callback functions.|
|event callback ref accepts a reference to an existing event callback registration.|
|error in describes error conditions that occur before this node runs. This input provides standard error in functionality.|
|event source ref accepts a .NET object or an ActiveX automation reference. Click the down arrow next to this input and select the type of event you want to generate, such as Mouse Down or Double Click. References must be to local objects. You cannot wire a reference to a remote object.|
|vi reference is a strict VI reference to the callback VI. vi reference must match exactly the data from the registered event and the callback VI must be reentrant.|
|user parameter contains data that you want to pass to the callback VI when the .NET or ActiveX object generates the event. For example, you can wire a string that includes a text message to the user parameter input to tell a user for which control the event occurred. If you want to use this parameter, you must wire it before you create the callback VI. You can wire any LabVIEW data type, including a cluster, to this parameter.|
|event callback ref out returns a reference to a new or existing callback registration.|
|error out contains error information. This output provides standard error out functionality.|
Use this function to register .NET and ActiveX events only. To unregister an event for .NET or ActiveX, wire the event callback ref out output to the Unregister For Events function.
Refer to the following VIs for examples of using the Register Event Callback function: