Share via


DisplayManager.Enabled Event

Definition

An event raised whenever the current session's display stack is enabled, and when DisplayManager.Start is called. You can re-enable the session display stack in several cases, such as switching Terminal Services sessions, or to recover from driver failures. We recommend that subscribers re-enumerate all targets and state in this call, since the system display stack could be left in any state before this event is raised.

// Register
event_token Enabled(TypedEventHandler<DisplayManager, DisplayManagerEnabledEventArgs const&> const& handler) const;

// Revoke with event_token
void Enabled(event_token const* cookie) const;

// Revoke with event_revoker
DisplayManager::Enabled_revoker Enabled(auto_revoke_t, TypedEventHandler<DisplayManager, DisplayManagerEnabledEventArgs const&> const& handler) const;
public event TypedEventHandler<DisplayManager,DisplayManagerEnabledEventArgs> Enabled;
function onEnabled(eventArgs) { /* Your code */ }
displayManager.addEventListener("enabled", onEnabled);
displayManager.removeEventListener("enabled", onEnabled);
- or -
displayManager.onenabled = onEnabled;
Public Custom Event Enabled As TypedEventHandler(Of DisplayManager, DisplayManagerEnabledEventArgs) 

Event Type

Remarks

DisplayManager events are not raised until you call DisplayManager.Start.

Applies to