In a Windows Service, I need to detect when the computer goes into sleep and when it wakes up, and run some code on these events. This needs to be done for sleep, standby and hibernate power modes.
How do I do that ?
In a Windows Service, I need to detect when the computer goes into sleep and when it wakes up, and run some code on these events. This needs to be done for sleep, standby and hibernate power modes.
How do I do that ?
Copyright © 2021 Jogjafile Inc.
Override the ServiceBase.OnPowerEvent() method.