How to reload registry settings ? (compact framework on a Symbol device)
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
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);
链接地址: http://www.djcxy.com/p/53694.html
上一篇: 当输入面板打开时,面板不会滚动到聚焦控制