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
SystemEvents.PowerModeChanged
You might also want to check out the SystemInformation.PowerStatus property.
SystemInformation.PowerStatus
1.4m articles
1.4m replys
5 comments
57.0k users