Laptop lid closing/opening events? RRS feed

  • Question

  • Hi,


    In windows 7 power management, there is a way to specify desired behaviors (sleep, hibernate, do nothing, etc) when the laptop lid is closed. Therefore there windows must somehow know the lid is closing.


    I tried to find a way to detect such a event, however I can only find suggestions to intercept events when the computer is entering/leaving sleep. This is not exactly what I am looking for, because I want to capture the event when the lid is closing, regardless whether or not it is going to sleep as a result of the lid closing.


    Could any one suggest the correct event to monitor?



    Sunday, December 19, 2010 6:55 PM


All replies

  • Registering for Power Events


    See also Power Management in Windows XP. It does talk about lid closing but did not give specific details on which ACPI event would be raised.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Wednesday, December 22, 2010 8:49 PM
  • Wrong answer!

    msdnuser2010 want to capture the lid close event not the lid close action.

    If you register a handle for GUID_LIDCLOSE_ACTION with  RegisterPowerSettingNotification, this will not be triggered at lid close. This will be triggered only when, in Control Panel -> Power Settings you will change the action for lid close.

    Wednesday, May 11, 2016 8:52 AM