TwclPowerEventsMonitor Class

The class allows an application to receive power state changes notifications.

Namespace: wclPowerEvents
TObject
  wclPowerEvents.TwclPowerEventsMonitor
type
 TwclPowerEventsMonitor = class
 end;

The TwclPowerEventsMonitor type exposes the following members.

Show:
 NameDescription
Create

Creates new object of the TwclPowerEventsMonitor class.

Destroy

Free the object.

Top
Show:
 NameDescription
Active

Gets the monitor's state.

MessageProcessing

Gets and sets the monitor's message processing method.

Top
Show:
 NameDescription
Close

Stops listening for the power events and releases all resources.

DoPowerStateChanged(TwclPowerState)

Fires the OnChanged event.

GetPowerStatus(TwclPowerStatus)

Retrieves the power status of the system. The status indicates whether the system is running on AC or DC power, whether the battery is currently charging, how much battery life remains, and if battery saver is on or off.

MessageReceived(TwclMessage)

The method called when a new notification message received.

Open

Opens the power state changes monitor and starts listening for events.

Top
Show:
 NameDescription
OnPowerStateChanged

The event fires when the system's power state has been changed.

Top