Вниз
Скачать: CL | DM;

ждущий режим   Найти похожие ветки 

 
oens ©   (2004-11-12 21:18) [0]

Подскажите, как определить что windows перешла в ждущий режим.
Более точнее нужно, что бы это событие отлавливалось таймером и
если система переведена в ждущий режим, была нажата button1.
Если можно, объясните на примере, т.е. с кусочком программного кода.
Спасибо.


 
oens ©   (2004-11-13 10:27) [1]

Сможет кто-нибудь помочь?


 
Piter ©   (2004-11-13 14:10) [2]

В MSDN искал?


 
Piter ©   (2004-11-13 14:28) [3]

Tips for Supporting OnNow (Power Management) in Windows 2000 Applications

"Power management notifications are sent through the WM_POWERBROADCAST message. The documentation states that before a system enters a sleep state, it will ask all the running applications if it"s OK to sleep by specifying the PBT_APMQUERYSUSPEND flag in the WM_POWERBROADCAST message. If all the applications respond TRUE, the OS will follow with the PBT_APMSUSPEND flag, indicating that the system is going to sleep. But if one of the applications responds with a BROADCAST_QUERY_DENY, the OS will follow with a PBT_APMQUERYSUSPENDFAILED message"

http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnarpower/html/powermgt_tips.asp


 
Piter ©   (2004-11-13 14:30) [4]

#define PBT_APMQUERYSUSPEND 0
#define PBT_APMQUERYSTANDBY 1
#define PBT_APMQUERYSUSPENDFAILED 2
#define PBT_APMQUERYSTANDBYFAILED 3
#define PBT_APMSUSPEND 4
#define PBT_APMSTANDBY 5
#define PBT_APMRESUMECRITICAL 6
#define PBT_APMRESUMESUSPEND 7
#define PBT_APMRESUMESTANDBY 8
#define PBTF_APMRESUMEFROMFAILURE 1
#define PBT_APMBATTERYLOW 9
#define PBT_APMPOWERSTATUSCHANGE 10
#define PBT_APMOEMEVENT 11

Плюс посмотри еще структуру TWMPower


 
oens ©   (2004-11-13 23:01) [5]

Всем спасибо


 
Piter ©   (2004-11-14 00:07) [6]

Кому это всем? Ж)


 
oens ©   (2004-11-14 11:46) [7]

Всем, a Вам Piter, персонально. Я действиельно очень признателен.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.027 c
1-1102582831
Jiny
2004-12-09 12:00
2004.12.26
Создание конструктор форм как в 1С


3-1101740218
изм
2004-11-29 17:56
2004.12.26
Подключение к MS SQL c помошью dbExpress


1-1102498183
Dolphin001
2004-12-08 12:29
2004.12.26
WebBrowser charset


1-1102863512
Илья
2004-12-12 17:58
2004.12.26
FileRead даёт результат -1


3-1101659505
Sirruf
2004-11-28 19:31
2004.12.26
Backup&Restore




   Наверх