What is the best way to detect when Windows power state is changing?
I need to preform some actions depending on whether the computer is going to Standby/Hibernate/Shut Down
The SystemEvents.PowerModeChanged
event should do what you want
You might also want to check out the SystemInformation.PowerStatus
property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With