Search code examples
windows-mobilecompact-frameworkwindows-mobile-5.0

Set the System Sleep/standby timeout programmatically


I need to set the sleep/standby timeout programmatically for my device. (ie when it sits idle for a while it turns off.)

It defaults to 120 and I have a tool that let me change it, but I want to change it via my program (dynamically).

Any ideas on how to do that?


Solution

  • Read Power Manager Suspend Timeouts on MSDN. Make sure to set the global event they mentioned at the end of the article to make the settings take effect.