I'm wondering if it's possible to catch Windows 7 Sleep/Suspend Messages.
http://stackoverflow.com/questions/727154/cant-catch-sleep-suspend-messages-winxp
I'm wondering if it's possible to catch Windows 7 Sleep/Suspend Messages.
http://stackoverflow.com/questions/727154/cant-catch-sleep-suspend-messages-winxp
Use PInvoke to call the Win32 API RegisterPowerSettingNotification. Details here.