I’d like to write very simple code from C# – a simple 2 button app that will allow me to change the action that is taken when the lid is closed.
From “sleep” to “no action” and vice versa.
I found that it somehow connected to WMI – but no actual info on how achieving this.
help would be much appreciated.
Thanks!
Take a look at the Windows API Code Pack, which is a wrapper around a lot of the Windows APIs. It includes the Power Management API.