Is there any way to find out when Windows will enter sleep mode/is in sleep mode?
Notification when Windows enters in sleep mode
993 views Asked by Mircea Ispas At
1
Is there any way to find out when Windows will enter sleep mode/is in sleep mode?
If you're using managed code then this is exposed in the
SystemEvents.PowerModeChanged
event.If you're using native code then you want to listen for the
WM_POWERBROADCAST
message in yourWindowProc
handler.