c# - Programmatically change Windows power settings -


is possible change power-saving behaviour of laptop computer on lid close hibernate/standby/shutdown do nothing .net framework?

edit: appear setting value standby , blocking standby application, lid close event can detected, i'm after.

i found this question deals detecting lid close, boils down using standby event or writing driver.

yes, can use wmi classes.

take here introduction wmi

note can use application.setsuspendstate, method allows suspend or hibernate. guess doesn't match needs...

about lid, there seems a way detect if lid closed or not...


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -