|LabVIEW 2016 Help|
|LabVIEW 2017 Help|
|LabVIEW 2018 Help|
|LabVIEW 2019 Help|
|LabVIEW 2020 Help|
LabVIEW can generate many different events. Use event registration to specify which events you want an Event structure to handle. When you register for an event, LabVIEW notifies you when that particular event occurs. In LabVIEW, you can register for an event statically or dynamically. With static registration, LabVIEW always queues the event and notifies you when the event occurs. For example, if you statically register for a Mouse Move event on a front panel control, LabVIEW queues this event every time the user moves the mouse over that control. With dynamic registration, you can design applications so that LabVIEW only queues the event and notifies you when the event occurs if that event occurs under the circumstances you specify. For example, you may not want to monitor the Mouse Move event until the user presses a certain key. You also can use dynamic registration to change which VIs or controls generate events and to handle events in a subVI rather than the VI where LabVIEW generates events.
LabVIEW automatically performs static registration when you run a VI that contains an Event structure. You can configure an Event structure to specify which user interface events on the front panel of a VI you want to handle in each Event structure case. Use the Edit Events dialog box to configure an Event structure to handle a statically registered event.
|Note You cannot statically configure an Event structure to handle events for the front panel of a different VI.|
Refer to examples\Structures\Event Structure\Event Structure.lvproj for examples of using static event registration.
Dynamically registering for events allows you to control when LabVIEW generates events, which events LabVIEW generates, and where LabVIEW handles those events. Dynamic event registration provides the following benefits: