开发者

How to reload registry settings ? (compact framework on a Symbol device)

I have a pocket pc from the Symbol manufacturer. I would like to change programmatically 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 registr开发者_Python百科y 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.

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.


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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜