3

Is it possible to change the power-saving behaviour of a laptop computer on lid close from hibernate/standby/shutdown to Do Nothing from the .NET Framework?

Edit: it would appear that by setting the value to Standby and blocking the standby from my application, the lid close event can be detected, which is what I'm really after.

I found this question which deals with detecting lid close, but it boils down to using a standby event or writing a driver.

Community
  • 1
  • 1
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287

1 Answers1

0

Yes, you can use the WMI classes.

Take a look here to an introduction to WMI

Note that you can also use Application.SetSuspendState, but this method only allows you to suspend or hibernate. So I guess it doesn't match your needs...

About the lid, there seems to be a way to detect if the lid is closed or not...

nrocha
  • 384
  • 1
  • 2
  • 9
  • AFAIK you need to write a driver to detect the `SYS_BUTTON_LID` message via `IOCTL_GET_SYS_BUTTON_EVENT`, but that would warrant a separate question. – Petrus Theron Sep 27 '10 at 09:43