DisplayManager.Changed Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An event that is raised when system display hardware is added, removed, or modified. This can occur whenever the DisplayAdapter or DisplayTarget collections change. Use this event to detect these changes and call GetCurrentAdapters and/or GetCurrentTargets to get the updated collections.
// Register
event_token Changed(TypedEventHandler<DisplayManager, DisplayManagerChangedEventArgs const&> const& handler) const;
// Revoke with event_token
void Changed(event_token const* cookie) const;
// Revoke with event_revoker
DisplayManager::Changed_revoker Changed(auto_revoke_t, TypedEventHandler<DisplayManager, DisplayManagerChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<DisplayManager,DisplayManagerChangedEventArgs> Changed;
function onChanged(eventArgs) { /* Your code */ }
displayManager.addEventListener("changed", onChanged);
displayManager.removeEventListener("changed", onChanged);
- or -
displayManager.onchanged = onChanged;
Public Custom Event Changed As TypedEventHandler(Of DisplayManager, DisplayManagerChangedEventArgs)
Event Type
Remarks
DisplayManager events are not raised until you call DisplayManager.Start.