locked
Help! How to make the change of registry take effect upon change? RRS feed

  • Question

  • Current I just want to change the time out value of backlight through the related registry located in "HKEY_CURRENT_USER\ControlPanel\BackLight". But they only take effect by rebooting the OS. Is there any API that can be used to make the change take effect upon change?

    Thursday, September 30, 2010 3:17 AM

Answers

  • You are dealing with power management behaviours and are dealing with something for which there will be low compatibility among various devices. Each OEM can implement their power management functionality differently and you'll find that some phones will ignore these values all together. 

     

    If you are trying to keep the backlight on longer than normal the most reliable way to do so is to generate key release events every few seconds from within your program. You'll need to be sure to stop generating these events when your program looses focus. Otherwise a user could navigate from your application, forget that it's running, and then will wonder why their phone won't turn off (or worst, the device just stays on until the battery dies). If you use this method you can have a timeout value in your application. If the user doesn't interact with your application before the timeout then stop generating the events and the normal timeout will start. 


    Joel Ivory Johnson | http://www.j2i.net | Device Application Development MVP
    It takes all the running you can do to stay in one place.If you want to get somewhere else,you must try to run at least twice as fast as that.
    • Marked as answer by warrentang Tuesday, October 5, 2010 7:11 AM
    Thursday, September 30, 2010 6:19 PM

All replies

  • Hi,

    This helps to create the custom event for registry chagnes:

    http://msdn.microsoft.com/en-us/library/aa917049.aspx

    Regards,

    Malleswar

    Thursday, September 30, 2010 5:05 AM
  • See this MSDN link
    http://msdn.microsoft.com/en-us/library/ee505284.aspx

    This is for windows ce, i didn't find it for windows mobile. i hope the implementation could be the same.

    you can trigger the event  BackLightChangeEvent as given in the link after change the registry


    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Thursday, September 30, 2010 6:45 AM
  • You are dealing with power management behaviours and are dealing with something for which there will be low compatibility among various devices. Each OEM can implement their power management functionality differently and you'll find that some phones will ignore these values all together. 

     

    If you are trying to keep the backlight on longer than normal the most reliable way to do so is to generate key release events every few seconds from within your program. You'll need to be sure to stop generating these events when your program looses focus. Otherwise a user could navigate from your application, forget that it's running, and then will wonder why their phone won't turn off (or worst, the device just stays on until the battery dies). If you use this method you can have a timeout value in your application. If the user doesn't interact with your application before the timeout then stop generating the events and the normal timeout will start. 


    Joel Ivory Johnson | http://www.j2i.net | Device Application Development MVP
    It takes all the running you can do to stay in one place.If you want to get somewhere else,you must try to run at least twice as fast as that.
    • Marked as answer by warrentang Tuesday, October 5, 2010 7:11 AM
    Thursday, September 30, 2010 6:19 PM