Partager via


PowerManager.DisplayStatusChanged Événement

Définition

Déclenché lorsque l’état de l’affichage associé à la session de l’application a changé.

// Register
static event_token DisplayStatusChanged(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void DisplayStatusChanged(event_token const* cookie) const;

// Revoke with event_revoker
static PowerManager::DisplayStatusChanged_revoker DisplayStatusChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> DisplayStatusChanged;
function onDisplayStatusChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("displaystatuschanged", onDisplayStatusChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("displaystatuschanged", onDisplayStatusChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.ondisplaystatuschanged = onDisplayStatusChanged;
Public Shared Custom Event DisplayStatusChanged As EventHandler(Of Object) 

Type d'événement

Remarques

Pour obtenir l’état actuel de l’affichage en réponse à cet événement, utilisez la propriété DisplayStatus. Cet événement correspond au GUID du paramètre d’alimentation GUID_SESSION_DISPLAY_STATUS.

S’applique à

Voir aussi