PowerManager.SystemSuspendStatusChanged 事件

定義

當裝置的暫停狀態變更時引發。

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

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

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

事件類型

備註

若要取得目前暫停狀態以回應此事件,請使用 SystemSuspendStatus 屬性。

適用於

另請參閱