Turning device on/off at predefined time ?

  • Thread starter Thread starter HenrikFogh
  • Start date Start date
H

HenrikFogh

Hi,

I am making an application for work studio. This means the user
is asked a question at random time within the workingday.

When in idle mode the device should be turned on/off by the application.
However I am not shure how to approace this task. Any sugestions would be
appriciated.

Thanks Henrik.
 
You can turn off the device by simulating a VK_TPOWER keypress by P/Invoking
the keybd_event API function.

You can use CeRunAppAtTime to schedule your application to start up again
(and wakeup the device) at a predefined time. You'll find this ready-wrapped
for the Compact Framework in OpenNETCF.Win32.Notify namespace
(www.opennetcf.org/sdf/). There is a SendKeyboardKey implementation in
OpenNETCF.Win32.Core. You may need to check the header files for the value
of VK_TPOWER (which is equal to VK_F18).

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
 
Back
Top