i want to avoid "Energy-Saving" when App is running.
---
there is a WM_POWERBROADCAST Message which i use under Xbase++ / Ot4xb
- Code: Select all Expand view RUN
- ELSEIF nMsg == WM_POWERBROADCAST
DO CASE
CASE wp = PBT_APMQUERYSUSPEND
RETURN BROADCAST_QUERY_DENY
CASE wp = PBT_APMQUERYSUSPENDFAILED
RETURN BROADCAST_QUERY_DENY
// since Vista ?
CASE wp = PBT_APMQUERYSTANDBY
RETURN BROADCAST_QUERY_DENY
CASE wp = PBT_APMQUERYSTANDBYFAILED
RETURN BROADCAST_QUERY_DENY
CASE wp = PBT_APMSTANDBY
RETURN BROADCAST_QUERY_DENY
* CASE wp = PBT_APMBATTERYLOW ; ::_OnDummy("PBT_APMBATTERYLOW ",Time())
* CASE wp = PBT_APMOEMEVENT ; ::_OnDummy("PBT_APMOEMEVENT ",Time())
* CASE wp = PBT_APMPOWERSTATUSCHANGE ; ::_OnDummy("PBT_APMPOWERSTATUSCHANGE",Time())
* CASE wp = PBT_APMRESUMEAUTOMATIC ; ::_OnDummy("PBT_APMRESUMEAUTOMATIC ",Time())
* CASE wp = PBT_APMRESUMECRITICAL ; ::_OnDummy("PBT_APMRESUMECRITICAL ",Time())
* CASE wp = PBT_APMRESUMESUSPEND ; ::_OnDummy("PBT_APMRESUMESUSPEND ",Time())
* CASE wp = PBT_APMSUSPEND ; ::_OnDummy("PBT_APMSUSPEND ",Time())
this will DENY "Energy-Saving" if available
i guess i have to place it in :HandleEvent() ... but in which CLASS