Share via


DisplayManager.Disabled Event

Definition

An event raised whenever the current session's display stack is disabled, and when DisplayManager.Stop is called. You can disable the session display stack in several cases, such as switching Terminal Services sessions, or to recover from driver failures. We recommend that subscribers attempt to clean up when Disabled is invoked. Most display APIs will fail while the session display stack is disabled.

// Register
event_token Disabled(TypedEventHandler<DisplayManager, DisplayManagerDisabledEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
DisplayManager::Disabled_revoker Disabled(auto_revoke_t, TypedEventHandler<DisplayManager, DisplayManagerDisabledEventArgs const&> const& handler) const;
public event TypedEventHandler<DisplayManager,DisplayManagerDisabledEventArgs> Disabled;
function onDisabled(eventArgs) { /* Your code */ }
displayManager.addEventListener("disabled", onDisabled);
displayManager.removeEventListener("disabled", onDisabled);
- or -
displayManager.ondisabled = onDisabled;
Public Custom Event Disabled As TypedEventHandler(Of DisplayManager, DisplayManagerDisabledEventArgs) 

Event Type

Remarks

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

Applies to