I mentioned how to program your Program It is also mentioned that the opennetcf is used to run programs at regular intervals for a long time. Article Here:
Http://www.cnblogs.com/fox23/archive/2008/02/03/AtTime.html
In fact, there is another interesting way to prevent the mobile phone from entering sleep state through simple registry settings on the smartphone.
First, the easiest way to think of is to constantly send empty (keyboard) messages to the OS: Keybd_event (vk_noname,0, Keyeventf_silent,0);
However, this will keep the backlight on, which is a waste. Therefore, we imagine that it would be nice to have related settings in the registry. After a simple review of the registry, there are some corresponding keys that can be set to prevent the WM device from sleep.
Open the Remote Registry Editor of vs2008 and connect to our smartphone. Here we use wm6.1 standard as an example to browse to the following directory:
In the hkcu/controlpanel/power directory, find the display key and change the DWORD Value (60 by default) to-1, which is equivalent to disabling the timed sleep function of the system.
Next, to make this change take effect immediately, we need to broadcast a message to let the OS know that a key value has changed during initialization: Postmessage (hwnd_broadcast, wm_wininichange,0,0);
Corresponding settings are also available on the Pocket PC:
Here, we recommend an article in the garden:
Http://www.cnblogs.com/Endink/archive/2006/07/18/sharping.html
This article introducesCodeControl backlights and periodic callsThe systemidletimerreset () function is used to reset the Sleep Timer.
Finally, we will remind you that you should not forget to restore all the changes to the registry in the program to the original settings when you exit the program, so as not to affect your use.
Enjoy it!
Yellow winter