views:

169

answers:

2

Hello,

I have a pocket pc from the Symbol manufactor. I would like to change programmaticaly the power timeouts and the backlight timeouts. The application in charge of this settings is written in C# and based on the Microsoft Compact Framework 3.5.

I achieved to change these timeouts values : I changed registry keys in HKLM/System/CurrentControlSet/Control/Power for power timeouts and in HKCU/ControlPanel/Backlight for backlight timeouts.

It works fine, but these settings are only applied after a soft reset of the device. I would like these settings to be applied right after my application enters the registry keys.

Did some of you already face this problem ? How can the settings in the registry be reloaded ? There must be a way to achieve that, because when i'm manually setting these values with the Windows Mobile Config Panel, settings apply immediately.

Thanks for your help

+1  A: 

You have to notify the OS that you've made the changes - it doesn't constantly watch or load the values. Simply broadcast a WM_SETTINGCHANGE:

SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, NULL,NULL);
ctacke
A: 

Try this link.. it should work

Shadow