PowerManager.SystemIdleStatusChanged 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.
Raised when the system is busy. This indicates that the system will not be moving into an idle state in the near future and that the current time is a good time for components to perform background or idle tasks that would otherwise prevent the computer from entering an idle state.
// Register
static event_token SystemIdleStatusChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void SystemIdleStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::SystemIdleStatusChanged_revoker SystemIdleStatusChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> SystemIdleStatusChanged;
function onSystemIdleStatusChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("systemidlestatuschanged", onSystemIdleStatusChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("systemidlestatuschanged", onSystemIdleStatusChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.onsystemidlestatuschanged = onSystemIdleStatusChanged;
Public Shared Custom Event SystemIdleStatusChanged As EventHandler(Of Object)
Event Type
Remarks
There is no notification when the system is able to move into an idle state. The idle background task notification does not indicate whether a user is present at the computer.
This event corresponds to the GUID_IDLE_BACKGROUND_TASK power setting GUID.