0

VB.NET has an event that fires when a computer's power mode is changed (SystemEvents.PowerModeChanged).

I need my program to find out what caused the power mode change, specifically, if there was a power button pressed, or some other reason.

How can I program this in VB.NET?

dario
  • 5,149
  • 12
  • 28
  • 32
  • https://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.powermodechanged(v=vs.110).aspx – Ňɏssa Pøngjǣrdenlarp Jun 17 '15 at 23:09
  • PowerModeChanged event only allows to find out how the power mode has changed, that is either a computer was suspended or resumed. It does not allow to find out what caused a computer to become resumed or suspended. It could be a power button press or something else. That is what I need to find out. – Santa Claus Jun 17 '15 at 23:39

0 Answers0