Table Of Contents

.NET Events

    Last Modified: November 20, 2020

    .NET events are actions that affect a .NET object, such as clicking a mouse, pressing a key, or receiving notifications about running out of memory or tasks completing. When a .NET action occurs, the .NET object sends an event and event-specific data to alert the .NET container. The .NET object defines the events available to itself.

    To use .NET events in an application, you must register the event and handle it when it occurs. A typical .NET event VI includes the following components:
    • .NET object you want to generate an event for.
    • Register Event Callback node to specify and register for the type of event you want to generate.
    • Callback VI that contains code to handle the .NET event you specify.

    To register a .NET object for an event, wire the .NET object to the Register Event Callback node and specify the event you want to generate for that object. After you register for the event, create a callback VI that contains code to handle the event. If you change the event after you create a callback VI, consider that different events might have different event data formats and check for broken wires on the diagram.

    Recently Viewed Topics