Вниз
Скачать: 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.025 c
6-1097653841
Maxwell
2004-10-13 11:50
2004.12.26
Узнать IP клиентов, подключаемых к idTCPServer


1-1103033063
alex145
2004-12-14 17:04
2004.12.26
Как управлять ресурсами приложения?


1-1102669514
ASoft
2004-12-10 12:05
2004.12.26
Folder.


1-1103038441
maxz
2004-12-14 18:34
2004.12.26
Утечка памяти


1-1102582279
Maxim_S~~
2004-12-09 11:51
2004.12.26
прогресс при загрузке программы




   Наверх