![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
ждущий режим [D6, Win95/98, WinME, NT4, Win2k, WinXP]
oens © (2004-11-12 21:18:00)Подскажите, как определить что windows перешла в ждущий режим.
Более точнее нужно, что бы это событие отлавливалось таймером и
если система переведена в ждущий режим, была нажата button1.
Если можно, объясните на примере, т.е. с кусочком программного кода.
Спасибо.
oens (2004-11-14 11:46:00) [1]Всем, a Вам Piter, персонально. Я действиельно очень признателен.
Piter (2004-11-14 00:07:00) [2]Кому это всем? Ж)
oens (2004-11-13 23:01:00) [3]Всем спасибо
Piter (2004-11-13 14:30:00) [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
Piter (2004-11-13 14:28:00) [5]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:10:00) [6]В MSDN искал?
oens (2004-11-13 10:27:00) [7]Сможет кто-нибудь помочь?